mongodb - Ubuntu 20.04 中的 Mongo 企业安装错误
问题描述
我最近更新到 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.
我该如何解决这个问题?
解决方案
MongoDB 为某些操作系统提供二进制包。Ubuntu 20.04 不是这些软件包可用的操作系统。
您可以通过手动下载和安装所需的包(例如, libsnmp30和libsensors4)让 MongoDB 在 20.04 上运行。
例如,如果在 18.04 和 20.04 之间进行了 C 库升级,则 18.04 包可能无法在 20.04 系统上使用,这将不起作用。
如果问题是针对生产环境并且您使用的是企业版 MongoDB,您可能应该坚持使用受支持的操作系统,例如 Ubuntu 18.04。如果这是用于开发环境,您可以在 Docker 中的 Ubuntu 18.04 中运行 MongoDB。
推荐阅读
- wicket - wicket 9 文件作为 ajax 更新下载
- laravel - Laravel TailwindCSS 添加更多颜色不起作用
- bash - xargs 退出而不等待子进程输出
- postgresql - 如何修复 DB 调用异常 - 错误:无法在 Spring boot JPA 的只读事务中执行 INSERT
- reactjs - 反应兄弟姐妹“倾听”彼此的状态变化
- reactjs - stipe 的 CardNumberElement 是否可用?
- bash - 运行前输出 bash 别名完整形式
- bootstrap-4 - BootStrap:行不能在一行包含两列
- node.js - 无法在 nodejs 中取消链接 webp 图像。错误资源繁忙或锁定
- android-studio - 使用 Android Studio Arctic Fox 构建的应用无法在 Android 设备上运行