我使用的是 64 位系统,我怀疑这就是造成此问题的原因。我尝试安装各种软件包,其中之一是libssl-dev
。
$ sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
libssl-dev : Depends: libssl1.0.0 (= 1.0.1f-1ubuntu2) but 1.0.1f-1ubuntu2.8 is to be installed
Recommends: libssl-doc but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我尝试sudo apt-get -f install
按照网站上类似问题中的建议操作。但我得到的结果是:
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
我在网站上进行了更多研究,有人建议手动安装缺少的软件包。所以我做了同样的事情:
$ sudo apt-get install libssl1.0.0 Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl1.0.0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
在这里您可以看到,该包已经安装。
所以我的猜测是我的系统正在尝试安装 64 位版本,libssl-dev
但找不到 64 位版本libssl1.0.0
。如果手动安装,我的系统显示我拥有的libssl1.0.0
是 32 位版本,怀疑是 32 位版本。
我要安装的软件包还有很多都感染了这个错误。
以下是请求的输出@nephente
$ uname -a
Linux sntsh-pc 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ apt-cache policy libssl1.0.0 libssl-dev
libssl1.0.0:
Installed: 1.0.1f-1ubuntu2.8
Candidate: 1.0.1f-1ubuntu2.8
Version table:
*** 1.0.1f-1ubuntu2.8 0
100 /var/lib/dpkg/status
1.0.1f-1ubuntu2 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
libssl-dev:
Installed: (none)
Candidate: 1.0.1f-1ubuntu2
Version table:
1.0.1f-1ubuntu2 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
$