安装mongodb时出错,破坏了ubuntu依赖

时间:2018-01-30 08:47:32

标签: mongodb ubuntu

尝试使用以下命令安装mongo

rahul@rahul ~ $ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mongodb-org is already the newest version (3.6.2).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mongodb-org : Depends: mongodb-org-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

1 个答案:

答案 0 :(得分:0)

我在Ubuntu 18机器上安装mongodb-org时遇到了同样的问题。

问题在于已经安装了mongodb版本,在继续之前必须将其删除。

解决方案是运行以​​下命令:

sudo apt remove mongodb-org
sudo apt purge mongodb-org
sudo apt autoremove

sudo apt-get install mongodb-org

可以在Mongodb website上找到更多信息-显然,这是一个经常发生的问题,他们不得不在那里解决!