linux - 在 linux 中安装 mongodb 时出错

标签 linux mongodb

   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.

即使我更新了 repo,我也收到了这个错误 : 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 <a href="http://repo.mongodb.org/apt/debian" rel="noreferrer noopener nofollow">http://repo.mongodb.org/apt/debian</a> 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

还是报同样的错。我该如何解决这个问题?

最佳答案


I guess this is the problem that you are facing. enter image description here

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:

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

现在您可能会收到如上图所示的错误。请尝试以下步骤:

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

enter image description here

关于linux - 在 linux 中安装 mongodb 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50375979/

相关文章:

linux - 在 linux scheduler 中,它是否跟踪当前正在休眠的任务或已终止的任务?

linux - $ EUID与$ UID不同时,如何产生情况?

linux - linux下是否可以监控所有进程对文件系统的所有写访问

c# - MongoDB C# 驱动程序重命名集合

javascript - Mongoose near(...) 对 2dsphere 索引字段的查询未返回有效结果

linux - 如何在带有空格的目录上使用查找?

linux - BASH - 基于变量创建和填充目录

node.js - MongoDB .deleteOne 在 Node.js 中不起作用

MySQL 导出到 MongoDB

mongodb - 是否可以为单个选择更改套接字超时?