一、背景
运行命名:lsb_release -a
版本;Description: Ubuntu 20.04.5 LTS
安装mongdb通过
sudo apt-get install -y mongodb-org
提示没安装好
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-get purge mongodb-org*
sudo apt-get install mongodb
安装成功
输入:mongo --version