If I try to install mongo on Ubuntu 14.04 with:
sudo apt-get install -y mongodb-org
I get the error:
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.
This similar question recommends running apt-mark showhold
to find the held packages and unhold them, but it shows nothing being held.
What's causing this error and how do I fix it?
I'm installing Mongo from Mongo's PPA. And I had previously had PPAs enabled for both the 3.0 and 3.4 versions. I removed the file /etc/apt/sources.list.d/mongodb-org-3.0.list
for the 3.0 version, to avoid conflicts, but I think there still might be some lingering issues.
I had the same problem and the problem was that libcurl3 wasn't installed. this should work.
It wasn't immediately obvious, but when I went back over the docs, I realized I installed the PPA for the wrong Ubuntu version. Removing that and installing the correct one fixed the error.