1. An error occurred after running "sudo
apt-get install mongo-org" on the Terminal:
ReadingPackage lists... DoneBuildingDependency TreeReadingState Information ... Done E: unable to Locate package MongoDB -org //this is the error
It is still the error message after running "apt-get update".
2. The result is set after the following steps are installed successfully:
#Step 1: ImportTheMongodb PublicKey sudo apt-Key adv--Keyserver HKP:keyserver.ubuntu.com:80--recv 7F0CEB10#Step 2: GenerateA fileWithTheMongodbRepository Urlecho' Deb Http://downloads-distro.mongodb.org/repo/ubuntu-upstart Dist 10gen ' |sudo tee/etc/Apt/Sources.List.D/mongodb.#step 3: refresh The local database with the Packagessudo apt-get Update#< Span class= "Typ" >step 4: install The last stable mongodb version and All the necessary packages in our Systemsudo apt-get install Mongodb-org
3.这时装好以后应该会自动运行mongod程序,通过"pgrep mongo -l "查看进程是否已经启动:
4.在终端输入"mongo",然后回车进入数据库
Issues with MongoDB installed in Ubuntu