The following packages have unmet dependencies:
mongodb-org-mongos : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-server : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-shell : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-tools : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
E: Unable to correct problems, you have held broken packages.
I am getting this error even i did update the repo: sudo apt-get update
also i did check if there any broken packeges with: sudo apt-get check
step i took to install mongodb in linux: 1) sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
2) echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
3) sudo apt-get update
4)sudo apt-get install -y mongodb-org
but still getting the same error. how can i solve this?
In my case, I'm using Linux Mint 17 -> Ubuntu 14.04 and I was installing with Ubuntu 16.04 resulting in this conflict.
Check your Ubuntu/Debian version - the wiki is a useful resource - before trying these commands.
If that doesn't solve it then run
sudo apt purge mongod*
sudo apt purge mongodb*
sudo apt purge mongodb-org*
That should remove any inconsistency and then go to https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ and follow the procedure.
This resolved the issue.
I'm also getting the following error while installing MongoDB
mongodb-org-mongos : Depends: libssl1.1 (>= 1.1.0) but it is not
installable
mongodb-org-server : Depends: libssl1.1 (>= 1.1.0) but it is not
installable
mongodb-org-shell : Depends: libssl1.1 (>= 1.1.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
Here is the solution for this kind of issue Use the following command
echo "deb http://security.ubuntu.com/ubuntu impish-security main" | sudo
tee /etc/apt/sources.list.d/impish-security.list
sudo apt-get update
sudo apt-get install libssl1.1
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt-get update
sudo apt-get install libssl1.1
After adding libssl1.1, follow mongoDB installation manual
https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
I guess this is the problem that you are facing. enter image description here
The following packages have unmet dependencies: mongodb-org-mongos: Depends: libssl1.1 (>= 1.1.1) but it is not installable mongodb-org-server: Depends: libssl1.1 (>= 1.1.1) but it is not installable E: Unable to correct problems, you have held broken packages.
You can try the following steps to install mongodb in Ubuntu at any version:
sudo apt update sudo apt upgrade wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - sudo apt-get update sudo apt-get install -y mongodb-org
Now you may get the error like above screenshot. Try the following steps:
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1\~18.04.20_amd64.deb sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
Now, mongodb is ready to be installed. Run the following installation command again:
sudo apt-get install -y mongodb-org
To check Mongodb version, run the following command:
mongod --version
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.