我无法安装此软件包。这是我使用 apt-get 安装时得到的结果。运行 14.04 64 位。
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:
libcurl4-openssl-dev : Depends: librtmp-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
输出apt-cache policy libcurl4-openssl-dev librtmp-dev
libcurl4-openssl-dev:
Installed: (none)
Candidate: 7.35.0-1ubuntu2.5
Version table:
7.35.0-1ubuntu2.5 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
7.35.0-1ubuntu2 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
librtmp-dev:
Installed: (none)
Candidate: 2.4+20121230.gitdf6c518-1
Version table:
2.4+20121230.gitdf6c518-1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
答案1
简单来说,就是在你安装你想要的包之前,需要先安装其他包。在 Linux 世界中,这被称为依赖关系。
有几种方法可以解决这个问题:
未满足依赖关系的一个可能原因是包数据库损坏,和/或某些包未正确安装。要解决此问题,请按 Alt+Ctrl+T 打开终端并尝试运行以下命令之一:
sudo apt-get clean
或
sudo apt-get autoclean
Autoclean 清除不再需要的下载包的本地存储库。或者您可以尝试通过 apt-get 解决依赖关系,
sudo apt-get -f install
交换机-f
会尝试纠正损坏的依赖关系。
有关更全面的指南,请参阅https://askubuntu.com/a/142808/456878
并将其保存起来以供参考。