I followed instructions given on the official MongoDB website (https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/) and I get this error when trying to install MongoDB. How to fix this issue and what's going wrong? Remember I'm using latest Ubuntu version 16.04
sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
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
virtualbox-5.0 : Depends: libqt4-opengl (>= 4:4.7.2) but it is not going to be installed
Depends: libsdl1.2debian (>= 1.2.11) but it is not going to be installed
Recommends: libsdl-ttf2.0-0 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Edit: Title. MongDB -> MongoDB.
Best Answer
Install mongodb in Ubuntu 12.04, 14.04 ,16.04
Import the public key used by the package management system
Create a list file for MongoDB.
In Ubuntu 12.04 (deprecated):
In Ubuntu 14.04:
In Ubuntu 16.04:
Reload local package database.
It will throw a warning
Just Ignore It.
Install the MongoDB packages.
After installation you can start MongoDB using
To stop MongoDB use
To restart MongoDB use
If that didn't work, check here to see if any of the steps have been updated: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/