$ sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
但这是我尝试从终端安装它们时得到的响应:
$ sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libreadline-dev' instead of 'libreadline6-dev'
build-essential is already the newest version (12.4ubuntu1).
libgdbm5 is already the newest version (1.14.1-6).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libncurses5-dev : Depends: libtinfo5 (= 6.1-1ubuntu1) but 6.1-1ubuntu1.18.04 is to be installed
Depends: libncurses5 (= 6.1-1ubuntu1) but 6.1-1ubuntu1.18.04 is to be installed
Depends: libtinfo-dev (= 6.1-1ubuntu1) but it is not going to be installed
libreadline-dev : Depends: libtinfo-dev but it is not going to be installed
libssl-dev : Depends: libssl1.1 (= 1.1.0g-2ubuntu4) but 1.1.0g-2ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.
好像我安装了一些损坏的软件包,但我不太确定。我该如何解决这个问题?
正如@guiverc 指出的那样,我错过了一些来源。
我去了“软件和更新”,在“更新”选项卡下,检查了“重要的安全更新”和“推荐的更新”。(不知道为什么他们没有被检查......)
之后,一切正常。
我面临同样的问题,我在 /etc/apt/source.list 的源列表中启用了“bionic-updates”“bionic-security”行。然后 apt-get update 并尝试再次安装这些软件包。
您应该能够使用以下命令进行安装,以指定您首先需要的特定版本:
然后,运行包含重新安装的原始安装命令,并发布任何错误:
我曾经在GRASS 包上遇到过类似的问题。以下是我解决此问题的方法:
aptitude
,一个包安装程序。sudo apt install aptitude
sudo aptitude install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
还有另一个相当难以弄清楚的问题。我的问题是系统时钟比实际日期晚了几天。一旦我修复它,我就可以安装 libncurses5-dev
检查我的终端输出
这对我有用:
第 1 步:打开终端(按Ctrl+ Alt+ T)。
第 2 步:输入:
software-properties-gtk
第 3 步:不要查找源文件,因为至少在我的情况下,它不在答案中其他地方提到的位置
第 4 步:将显示软件更新面板。
到达那里后,只需允许所有来源都能够更新。我相信有三个选项 - 全部勾选!