简体   繁体   English

在Debian 8.0(Jessie)上安装MongoDB

[英]Install MongoDB on Debian 8.0 (Jessie)

I can't install mongodb on debian 8. 我无法在Debian 8上安装mongodb。

I use the instruction on docs.mongodb 我使用docs.mongodb上的说明

When i run sudo apt-get install -y mongodb-org , getting error: 当我运行sudo apt-get install -y mongodb-org ,出现错误:

sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mongodb-org : Depends: mongodb-org-shell but it is not going to be installed
               Depends: mongodb-org-server but it is not going to be installed
               Depends: mongodb-org-mongos but it is not going to be installed
               Depends: mongodb-org-tools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

My source.list 我的source.list

sudo cat /etc/apt/sources.list.d/* 
deb http://fastpanel.fastvps.ru/fastpanel wheezy main
deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main
deb http://nginx.org/packages/debian/ wheezy nginx
deb-src http://nginx.org/packages/debian/ wheezy nginx

尝试使用--fix-missing选项。

sudo apt-get install -y mongodb-org --fix-missing

You have a mixed sources.list jessie and wheezy , keep only mongodb-org-3.4.list under /etc/apt/sources.list.d/ with the following url : 您的sources.list和jessie和wheezy混合在一起,在/etc/apt/sources.list.d/下仅保留mongodb-org-3.4.list并使用以下网址:

deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main

Also , verify your /etc/apt/sources.list you should have only the URLs compatible with debian jessie. 另外,验证您的/etc/apt/sources.list您应该仅具有与debian jessie兼容的URL。

Then run : 然后运行:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install mongodb-org

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM