3

I am trying to install mongodb on ubuntu 14.04 and I am following the steps on docs.mongodb.org

But when I get to the step:

sudo apt-get install -y mongodb-org

I get the following error :

root@sabbir-pc:~# sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mongodb-org

And I get to the step:

sudo apt-get install -y mongodb-org=3.0.1 mongodb-org-server=3.0.1 mongodb-org-shell=3.0.1 mongodb-org-mongos=3.0.1 mongodb-org-tools=3.0.1

I found the following problem

root@sabbir-pc:~# sudo apt-get install -y mongodb-org=3.0.1 mongodb-org-server=3.0.1 mongodb-org-shell=3.0.1 mongodb-org-mongos=3.0.1 mongodb-org-tools=3.0.1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mongodb-org
E: Unable to locate package mongodb-org-server
E: Unable to locate package mongodb-org-shell
E: Unable to locate package mongodb-org-mongos
E: Unable to locate package mongodb-org-tools

How can I solve this problem? I also follow stackoverflow link (same problem), but no result.

3

You need to add the PPA

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
  • I already do this as I mention on the link doc.mongodb.org – sabbir Apr 8 '15 at 9:19
2

I had the same problem. I wrong to write the list file for mongo where we insert the mongodb repository within Ubuntu sources list.

I strongly suggest to rewrite the following commands (for 14.04):

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

and:

sudo apt-get update

After that you will be able to install the latest mongodb version:

sudo apt-get install -y mongodb-org

All described in the MongoDB website: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/?_ga=1.85252765.529335644.1441475542#install-mongodb

1

I Mongodb doesn't support 32 bit operating systems. I faced the same problem as above until I realised that my os is 32 bit. Please verify if your os is 32 bit

mongodb installation

0

I had the same problem while trying to install version 3.0 of MongoDB. I think there is some compatibility that needs to be resolved before we on Ubuntu 14.04 can actually install without errors.

What I did was just follow the installation for Mongodb-org version 2.6.9. That is the closest to version 3.0. The installation guide is very detailed and you will have no problem following it.

After installation, simply do a

sudo apt-get update

This will update any outdated package(s).

and to make it easy, here is the link to the installation guide for version 2.6.9

http://docs.mongodb.org/v2.6/tutorial/install-mongodb-on-ubuntu/

hope that helps... let me know if it works for you or anyone has found a better way.

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.