Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I can't install a specific version of MongoDB?

Tags:

mongodb

I want install mongoDB 2.6.6, i follow this tutorial (http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/)

daniela.morais@tusk:/var/lib$ sudo apt-get install -y mongodb-org=2.6.6 mongodb-org-server=2.6.6 mongodb-org-shell=2.6.6 mongodb-org-mongos=2.6.6 mongodb-org-tools=2.6.6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '2.6.6' for 'mongodb-org' was not found
E: Version '2.6.6' for 'mongodb-org-server' was not found
E: Version '2.6.6' for 'mongodb-org-shell' was not found
E: Version '2.6.6' for 'mongodb-org-mongos' was not found
E: Version '2.6.6' for 'mongodb-org-tools' was not found
like image 808
Daniela Morais Avatar asked Mar 19 '15 14:03

Daniela Morais


People also ask

What is the command to install MongoDB?

Type mongo.exe (which is the command used to start mongo Db Power shell).


2 Answers

To install mongodb 2.6 you'll need to follow this tutorial: http://docs.mongodb.org/v2.6/tutorial/install-mongodb-on-ubuntu

After adding the public key,

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

the differentiating step is adding this source:

echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

Then you can install 2.6 with

sudo apt-get update
sudo apt-get install -y mongodb-org

When I ran this installation on Ubuntu I get 2.6.8. You can check by using

mongod --version
like image 154
kal Avatar answered Dec 07 '22 13:12

kal


If you enter apt-cache show <pkgname> it will give you a list of versions that are available form your package repository.

Try: apt-cache show mongodb-org.

If you enter apt-cache show mongodb-org | grep Version it will show you only the version numbers.

If you get "E: No packages found", you need to create the file /etc/apt/sources.list.d/mongodb-org-3.0.list as described on the page you linked first, then run sudo apt-get update.

like image 32
neuhaus Avatar answered Dec 07 '22 14:12

neuhaus