Ubuntu 20.04中的Mongo企业安装错误

时间:2020-05-20 09:24:23

标签: mongodb installation ubuntu-20.04

我最近已更新到Ubuntu 20.04,在安装MongoDb企业版时遇到问题。

digvj@digvj:~$ sudo apt-get install -y mongodb-enterprise
Reading package lists... Done
Building dependency tree       
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-enterprise : Depends: mongodb-enterprise-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

在我指定了每个mongo软件包的地方运行命令时,也会显示此错误:

digvj@digvj:~$ sudo apt-get install -y mongodb-enterprise=4.2.6 mongodb-enterprise-server=4.2.6 mongodb-enterprise-shell=4.2.6 mongodb-enterprise-mongos=4.2.6 mongodb-enterprise-tools=4.2.6
Reading package lists... Done
Building dependency tree       
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-enterprise-server : Depends: libsensors4 (>= 1:3.0.0) but it is not installable
                             Depends: libsnmp30 (>= 5.7.3+dfsg-1.8ubuntu3.3~dfsg) but it is not installable
E: Unable to correct problems, you have held broken packages.

我该如何解决?

2 个答案:

答案 0 :(得分:0)

MongoDB为某些操作系统提供二进制程序包。 Ubuntu 20.04不是该软件包可用的操作系统。

也许可以通过手动下载并安装所需的软件包(例如libsnmp30libsensors4)使MongoDB在20.04上运行。

例如,如果在18.04和20.04之间进行了C库升级,则18.04软件包可能无法在20.04系统上使用,并且将无法使用。

如果问题是针对生产环境的,并且您正在使用MongoDB的企业版,则可能应该坚持使用受支持的操作系统,例如Ubuntu 18.04。如果这是用于开发环境,则可以在Docker的Ubuntu 18.04中运行MongoDB。

答案 1 :(得分:0)

我已在MongoDb Zira问题中添加了问题,并在那里找到了解决方案。 这是链接:

https://jira.mongodb.org/browse/SERVER-48316