我想安装 mongodb,我按照教程操作,但是当我使用时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
N: Ignoring file 'mongodb-org' in directory '/etc/apt/sources.list.d/' as it has no filename extension
E: Unable to correct problems, you have held broken packages.
答案1
如果你已经按照本指南操作页,该mongodb-org
包对 没有依赖性libssl1.1
,仅对 有依赖性libssl3
。
您确定您为 Jammy(22.04) 选择了正确的存储库,而不是 Focal(20.04) 或 Bionic(18.04)?因为 Focal 和 Bionic 仅提供openssl1.1
,这可以解释错误/缺失的依赖项。
查看依赖关系图: