The following packages have unmet dependencies:
mongodb-org-mongos : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-server : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-shell : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-tools : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
即使我更新了回购:sudo apt-get update
,也收到此错误
此外,我还检查了是否有损坏的 Package 盒:sudo apt-get check
在Linux上安装MongoDB的第一步:1)sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
2)echo "deb d1c0c1d wheezy/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
3)sudo apt-get update
4)sudo apt-get Install-y MongoDB-org
但仍然得到相同的错误。我怎么才能解决这个问题?
4条答案
按热度按时间nbewdwxp1#
在安装MongoDB时,我也收到以下错误
以下是使用以下命令解决此类问题的方法
v1uwarro2#
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt-get update
sudo apt-get install libssl1.1
添加完libssl1.1后,请遵循MongoDB安装手册
https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
2mbi3lxu3#
在我的例子中,我使用的是Linux Mint 17->Ubuntu 14.04,而我安装的是Ubuntu 16.04,导致了这个冲突。
在尝试这些命令之前,请检查您的Ubuntu/Debian版本--wiki是一个有用的资源。
如果这还不能解决问题,那就运行
这应该会消除任何不一致,然后转到https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/并遵循该过程。
这解决了问题。
h43kikqp4#
sudo apt-get install -y mongodb-org
mongod --version
enter image description here