1

So I understand that MongoDB is not supported on Ubuntu 15.04. Many users have suggested using the debian wheezey repository and that MongoDB installs and works. However, I am not having the same luck.

I Know it was mistake to choose Ubuntu 15 and not Ubuntu 14 LTS, but have put a lot of work into building the server, and don't want to downgrade.

That being said here are the steps I used to install MongoDB.

sudo apt-get purge mongodb-org*
sudo apt-get autoremove
sudo rm /etc/apt/sources.list.d/mongodb*

echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

sudo apt-get update
sudo apt-get install -y mongodb-org


sudo service mongod start

When I try to start mongod, I get the error bellow.

Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory.

Trying to follow the instructions given in the top answer of link below, however it's not working for me.

MongoDB 2.6 does not start on Ubuntu 15.04

Also referencing the Jira for this issue

https://jira.mongodb.org/browse/SERVER-17742

  • The key is fine, and I believe you want to use wheezey because there are many other people who are saying it works on 15.04 – swiftdeveloper Aug 8 '15 at 22:07
0

Okay, I think I found the problem. I completely recreated the problem you were having and then fixed it.

Run the following commands one-by-one to fully fix this issue. When you are done, the problem should be fixed and mongod will be up and running:

sudo rm /etc/init.d/mongod
sudo apt-get purge mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools syslog-ng-mod-mongodb
echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get clean
sudo apt-get update
mkdir mongodb;cd mongodb
wget http://repo.mongodb.org/apt/debian/dists/wheezy/mongodb-org/stable/main/binary-amd64/mongodb-org_3.0.5_amd64.deb
sudo apt-get install gdebi
sudo gdebi mongodb-org_3.0.5_amd64.deb

Select Y to install and then press enter.

sudo service mongod start
sudo systemctl status mongod

The output should show the service is active

| improve this answer | |
  • thanks for the replies. the enable command generates this error "Failed to execute operation: No such file or directory" – swiftdeveloper Aug 8 '15 at 22:02
  • Okay going to give all that a try in a bit. Thanks =D – swiftdeveloper Aug 8 '15 at 22:17
  • I started with the docs, until i realized that 15.04 is not supported. There are other threads where people have been able to install latest Mongo using debian wheezey. I don't have enough rep to comment on those threads, and for some reason not sharing in their success. – swiftdeveloper Aug 8 '15 at 22:46
  • I believe that is correct, however from what i understand there is something broken in the vivid version of the *.deb. – swiftdeveloper Aug 9 '15 at 0:15
  • @swiftdeveloper I think there were some ubuntu versions left, the debian versions don't have upstart jobs and the same version for ubuntu do so the upstart jobs and the lack of lsb headers for the init jobs equate to lack of systemd integration. After getting behind a real computer (and not just a "smart" phone) I recreated the problem and fixed it on one of my machines and fully changed the answer for you. – mchid Aug 9 '15 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.