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.
Run Code Online (Sandbox Code Playgroud)
即使我确实更新了回购,我也收到此错误: sudo apt-get update
我也确实检查了是否有任何破损的包装: sudo apt-get check
我在 linux 中安装 mongodb 所采取的步骤:1) sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
2) echo "deb http://repo.mongodb.org/apt/debian 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
但仍然得到同样的错误。我该如何解决这个问题?
小智 14
我想这就是您面临的问题。 在此输入图像描述
Run Code Online (Sandbox Code Playgroud)The following packages have unmet dependencies: mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.1) but it is not installable mongodb-org-server : Depends: libssl1.1 (>= 1.1.1) but it is not installable E: Unable to correct problems, you have held broken packages.
您可以尝试以下步骤在任意版本的 Ubuntu 中安装 mongodb:
Run Code Online (Sandbox Code Playgroud)sudo apt update sudo apt upgrade wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - sudo apt-get update sudo apt-get install -y mongodb-org
现在您可能会收到如上屏幕截图所示的错误。尝试以下步骤:
Run Code Online (Sandbox Code Playgroud)wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1\~18.04.20_amd64.deb sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
现在,mongodb 已准备好安装。再次运行以下安装命令:
sudo apt-get install -y mongodb-org
要检查 Mongodb 版本,请运行以下命令:
mongod --version
100%有效的解决方案!!!
以下解决方案适用于我安装 mongodb:
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
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/
In my case, I'm using Linux Mint 17 -> Ubuntu 14.04 and I was installing with Ubuntu 16.04 resulting in this conflict.
Check your Ubuntu/Debian version - the wiki is a useful resource - before trying these commands.
If that doesn't solve it then run
sudo apt purge mongod*
sudo apt purge mongodb*
sudo apt purge mongodb-org*
Run Code Online (Sandbox Code Playgroud)
That should remove any inconsistency and then go to https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ and follow the procedure.
This resolved the issue.
| 归档时间: |
|
| 查看次数: |
8012 次 |
| 最近记录: |