I installed MongoDB 2.6 on clean installed Ubuntu 15.04:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org
It finished without any problems.
However, when I tried to start it, I got the following error:
$ sudo service mongod start
Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory.
How can I fix this?
Best Answer
I installed from the debian wheeze repository and it works fine.
First make sure you remove the mongodb-org package and all its dependencies:
Remove the old mongodb.list you created:
Use the Debian repository instead:
Update and install again:
After that, you can succesffully start the server:
or
(as clarified by Ernie Hershey in reply to Roman Gaufman's comment here: https://jira.mongodb.org/browse/SERVER-17742)