Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB installation in Ubuntu 14.04 Failed

I followed the steps as mentioned in the official site of MongoDB.

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
sudo apt-get install -y mongodb-org

Running the last command I get an error:

E: Unable to locate package mongodb-org

Please help.

like image 606
Main Avatar asked Mar 26 '15 20:03

Main


2 Answers

Just try

sudo apt-get install -y mongodb
like image 97
Main Avatar answered Sep 22 '22 19:09

Main


For proper installation of MongoDB, follow these steps:

Note: According to ubuntu 12.06 ,14.04 , 16.04 there is different kind of installation

Below Code is For Ubuntu 14.04 ,And for other version click above link

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start  

//restart your pc if it dosen't starts

Just in case commands don't work due to version change please refer to original source

like image 28
vijay Avatar answered Sep 19 '22 19:09

vijay