由于持有损坏的软件包,无法安装 Mongo

Cer*_*rin 9 upgrade apt ppa mongodb

如果我尝试在 Ubuntu 14.04 上安装 mongo:

sudo apt-get install -y mongodb-org
Run Code Online (Sandbox Code Playgroud)

我收到错误:

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.
Run Code Online (Sandbox Code Playgroud)

This similar question建议运行apt-mark showhold以查找保留的包并取消保留它们,但它显示没有任何保留。

是什么导致了这个错误,我该如何解决?

我正在从 Mongo 的 PPA 安装 Mongo。而且我之前已经为 3.0 和 3.4 版本启用了 PPA。我删除了/etc/apt/sources.list.d/mongodb-org-3.0.list3.0 版本的文件,以避免冲突,但我认为仍然可能存在一些挥之不去的问题。

Ahm*_*out 6

我遇到了同样的问题,问题是未安装 libcurl3。这应该有效。

sudo apt install libcurl3
Run Code Online (Sandbox Code Playgroud)


Cer*_*rin 5

这并不是很明显,但是当我回顾文档时,我意识到我安装了错误的 Ubuntu 版本的 PPA。删除该错误并安装正确的错误即可修复。