gpt4 book ai didi

linux - 在 Ubuntu 20.04 中安装 mongodb 时出现 "mongodb-org : Depends: mongodb-org-server but it is not going to be installed"

转载 作者:行者123 更新时间:2023-12-04 19:06:26 25 4
gpt4 key购买 nike

我犯了sudo apt install mongodb先安装mongodb的错误,删除它,然后尝试安装为 official documentation对 Ubuntu 20.04 (Linux Mint) 这么说,但现在我无法安装任何其他软件包,因为它给了我:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
mongodb-org : Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
试过 sudo apt reinstall sudo apt --fix-broken install sudo apt purge <package_name> sudo apt remove <package_name> sudo apt-get install -f运行时 sudo apt install --fix-broken :
sudo apt install --fix-broken            
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
mongodb-database-tools mongodb-org-mongos mongodb-org-server
The following NEW packages will be installed:
mongodb-database-tools mongodb-org-mongos mongodb-org-server
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0 B/89,2 MB of archives.
After this operation, 148 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 414079 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_4.4.6_amd64.deb ...
Unpacking mongodb-org-server (4.4.6) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.4.6_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.6.9+really3.6.8+90~g8e540c0b6
d-0ubuntu5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.4.6_amd64.deb ...
Unpacking mongodb-org-mongos (4.4.6) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.4.6_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.6.9+really3.6.8+90~g8e540c0b6
d-0ubuntu5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-database-tools_100.3.1_amd64.deb ...
Unpacking mongodb-database-tools (100.3.1) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-database-tools_100.3.1_amd64.deb (--unpack):
trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-org-server_4.4.6_amd64.deb
/var/cache/apt/archives/mongodb-org-mongos_4.4.6_amd64.deb
/var/cache/apt/archives/mongodb-database-tools_100.3.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

如果我尝试按照官方文档重新安装 mongodb,它会再次给我我之前提到的相同错误。
提前致谢。

最佳答案

这解决了我的问题;dpkg -l | grep mongo将显示软件包列表,然后是 dpkg -r <nameofpkg>可用于 dpkg -l | grep mongo 的输出的每个包.

关于linux - 在 Ubuntu 20.04 中安装 mongodb 时出现 "mongodb-org : Depends: mongodb-org-server but it is not going to be installed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68090282/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com