yca@yca-laptop:~/Downloads$ sudo apt-get install mongodb
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 : Depends: mongodb-server (>= 1:2.4.1-2) but it is not going to be installed
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
Depends: mongodb-org-tools but it is not going to be installed
Conflicts: mongodb but 1:3.6.3-0ubuntu1.1 is to be installed
mongodb-org-shell : Conflicts: mongodb but 1:3.6.3-0ubuntu1.1 is to be installed
N: Ignoring file 'mongodb-org-3.6.listsudo' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我尝试通过命令行安装mongo db。但是由于以下错误,mogodb无法安装。
答案 0 :(得分:0)
更多的是askubuntu案例,但是您可以尝试以下几种操作:
sudo apt-get update
sudo apt-get upgrade
apt --fix-broken install
sudo apt-get install mongodb-server mongodb-org-server mongodb-org-mongos mongodb-org-tools