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 08 '15 at 22:07

1 Answers1

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

mchid
  • 43,546
  • 8
  • 97
  • 150
  • thanks for the replies. the enable command generates this error "Failed to execute operation: No such file or directory" – swiftdeveloper Aug 08 '15 at 22:02
  • Okay going to give all that a try in a bit. Thanks =D – swiftdeveloper Aug 08 '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 08 '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 09 '15 at 00: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 09 '15 at 00:38
  • Exciting! Let me try. =D – swiftdeveloper Aug 09 '15 at 00:41
  • That did indeed work, thank you so much. Just curious, why do we need to list the wheezy source if we are downloading and installing the *deb manually? Somewhat new to Ubuntu... – swiftdeveloper Aug 09 '15 at 00:47
  • @swiftdeveloper Well, first of all, there are dependencies that are needed from that repo. Next, downloading the deb manually may not have been needed but that's how I did it when it worked so I went ahead and included that step in the instructions because the method had been tested. For future reference, manually installing a deb that way is not normally recommended and is also not typical so don't make a habit of it :) – mchid Aug 09 '15 at 01:13