apt由于"未满足的依赖项"而无法安装 libssl1.0. 0:i386?

分享于 

7分钟阅读

ubuntu

  繁體

问题

我尝试在14.04 box (amd64 )上安装libssl1.0.0:i386,但是,当我尝试通过APT执行此操作时,收到以下错误消息:


nathan@nathan-desktop:~$ sudo apt-get install libssl1.0.0:i386


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 resolve the situation:



The following packages have unmet dependencies:


 default-jre-headless : Depends: openjdk-7-jre-headless (>= 7~u3-2.1.1) but it is not going to be installed


 openjdk-7-jre : Depends: openjdk-7-jre-headless (= 7u55-2.4.7-1ubuntu1) but it is not going to be installed


 Recommends: libgnome2-0 but it is not going to be installed


 Recommends: libgnomevfs2-0 but it is not going to be installed


 openssh-client : Depends: libssl1.0.0 (>= 1.0.1) but it is not going to be installed


 openssh-server : Depends: libssl1.0.0 (>= 1.0.1) but it is not going to be installed


 Depends: openssh-sftp-server but it is not going to be installed


 Recommends: ssh-import-id but it is not going to be installed


E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.



我安装了所有最新的更新。我已经运行了apt-get -f install,我确保所有存储库都启用了软件源,

会是什么原因?

以下是apt-cache policy libssl1.0.0的内容:


libssl1.0.0:


 Installed: 1.0.1g-1ppa1~trusty1


 Candidate: 1.0.1g-1ppa1~trusty1


 Version table:


 *** 1.0.1g-1ppa1~trusty1 0


 100 /var/lib/dpkg/status


 1.0.1f-1ubuntu2.1 0


 500 http://ca.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages


 500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages


 1.0.1f-1ubuntu2 0


 500 http://ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages



,和apt-cache policy libssl1.0.0:i386


libssl1.0.0:i386:


 Installed: (none)


 Candidate: 1.0.1f-1ubuntu2.1


 Version table:


 1.0.1f-1ubuntu2.1 0


 500 http://ca.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages


 500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 Packages


 1.0.1f-1ubuntu2 0


 500 http://ca.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages




答案1

此类错误消息通常表示,正在安装与其他已安装软件包有冲突,并会强制删除其他从属软件包。当同时为多个架构安装同一个包(请参见),amd64i386时,必须完全匹配要安装的包的版本。

要安装libssl1.0.0:i386,你必须从存储库安装相同的libssl1.0.0:amd64版本,由于openssl源包构建多个相关的二进制包,所以必须确保它所有包都位于同一版本,如果不指定所有要降级的软件包,apt将优先卸载而不是降级。在这种情况下,如果已经从PPA安装了libssl1.0.0libssl-devopenssl,那么你应该


sudo apt-get install libssl1.0.0/trusty libssl-dev/trusty openssl/trusty



现在应该能够从存储库安装libssl1.0.0:i386包。


答案2

我遇到了与你类似的错误:


user@debian:~/folder$ sudo apt-get install -y mongodb-org


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:


 mongodb-org : Depends: mongodb-org-shell but it is not going to be installed


 Depends: mongodb-org-server but it is not going to be installed


 Depends: mongodb-org-mongos but it is not going to be installed


 Depends: mongodb-org-tools but it is not going to be installed


E: Unable to correct problems, you have held broken packages.



尝试逐个安装软件包:


user@debian:~/folder$ sudo apt-get install -y mongodb-org-tools 


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:


 mongodb-org-tools : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable


E: Unable to correct problems, you have held broken packages.



我在这篇文章中找到了解决方案:https://linuxconfig.org/how-to-install-spotify-on-debian-9-stretch-linux

它只安装旧的ssl包:


$ wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb


$ sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb




答案3

这是因为没有安装web socket库。尝试运行


sudo apt-get install libwebsockets-dev



运行前


sudo apt-get install mosquitto





DEP  依赖  LIBS  APT  Libssl