Ubuntu 22.04 无法安装 MongoDB

Ubuntu 22.04 无法安装 MongoDB

操作系统:Ubuntu 22.04 LTS x86_64

我正在尝试从官方网站安装 MongoDB 社区版。我按照说明操作,但遇到两个问题。

第一个:跑步的时候sudo apt-get update我在底部看到这个,

W: https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/5.0/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

第二种:跑步时sudo apt-get install -y mongodb-org

Reading package lists... Done
Building dependency tree... Done
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-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
 mongodb-org-shell : Depends: libssl1.1 (>= 1.1.1) but it is not installable
E: Unable to correct problems, you have held broken packages.

答案1

看来 22.04 上可用的 libssl 版本只有版本 3https://packages.ubuntu.com/search?suite=jammy-updates&arch=any&searchon=names&keywords=libsslMongoDB 似乎不支持该版本,另外,安装说明中没有列出对 22.04 的支持,看来你必须使用其他版本或使用 docker 镜像:https://hub.docker.com/_/mongo

相关内容