Mongodb installation in Ubuntu 14.04 Failed

瘦欲@ 提交于 2019-12-04 16:05:38

问题


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.


回答1:


Just try

sudo apt-get install -y mongodb



回答2:


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




回答3:


Instead on mongodb-org make it : sudo apt-get install -y mongodb



来源:https://stackoverflow.com/questions/29287915/mongodb-installation-in-ubuntu-14-04-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!