我想安装mongoDB 2.6.6,我遵循本教程(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
答案 0 :(得分:3)
要安装mongodb 2.6,您需要按照本教程进行操作:http://docs.mongodb.org/v2.6/tutorial/install-mongodb-on-ubuntu
添加公钥后,
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
差异化步骤是添加此来源:
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
然后你可以用
安装2.6sudo apt-get update
sudo apt-get install -y mongodb-org
当我在Ubuntu上运行此安装时,我得到2.6.8。您可以使用
进行检查mongod --version
答案 1 :(得分:1)
如果您输入apt-cache show <pkgname>
,它将为您提供包裹存储库中可用版本的列表。
尝试:apt-cache show mongodb-org
。
如果您输入apt-cache show mongodb-org | grep Version
,则会显示仅版本号。
如果您收到“E:未找到包裹”,则需要按照首先链接的页面上的说明创建文件/etc/apt/sources.list.d/mongodb-org-3.0.list
,然后运行sudo apt-get update
。