MongoDB Install Fails on Ubuntu 22.04 - Depends on libssl1.1 but it is not installable
Solution 1
MongoDb has no official build for ubuntu 22.04 at the moment.
Ubuntu 22.04 has upgraded libssl to 3, and does not propose libssl1.1
You can force the installation of libssl1.1 by adding the ubuntu 21.10 source :
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
Then use your commands to install mongodb-org.
Then delete the impish-security list file you just created:
rm /etc/apt/sources.list.d/impish-security.list
Solution 2
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i ./libssl1.1_1.1.0g-2ubuntu4_amd64.deb
rm -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
Solution 3
@yehuda suggested libssl1.1_1.1.0g
which does not meet the dependency criteria >=1.1.1
. Expanding on that approach, I tried the below and it worked.
Based on the packages provided by ubuntu for libssl
-
bionic (18.04LTS) (libdevel): Secure Sockets Layer toolkit - development files
- 1.1.1-1ubuntu2.1~18.04.17 [security]: amd64 i386
1.1.0g-2ubuntu4 [ports]: arm64 armhf ppc64el s390x
-
bionic-updates (libdevel): Secure Sockets Layer toolkit - development files
- 1.1.1-1ubuntu2.1~18.04.17: amd64 arm64 armhf i386 ppc64el s390x
-
focal (20.04LTS) (libdevel): Secure Sockets Layer toolkit - development files
- 1.1.1f-1ubuntu2.13 [security]: amd64 i386
- 1.1.1f-1ubuntu2 [ports]: arm64 armhf ppc64el s390x
-
focal-updates (libdevel): Secure Sockets Layer toolkit - development files
- 1.1.1f-1ubuntu2.13: amd64 arm64 armhf i386 ppc64el s390x
-
impish (21.10) (libdevel): Secure Sockets Layer toolkit - development files
- 1.1.1l-1ubuntu1.3 [security]: amd64 i386
- 1.1.1l-1ubuntu1 [ports]: arm64 armhf ppc64el s390x
-
impish-updates (libdevel): Secure Sockets Layer toolkit - development files
- 1.1.1l-1ubuntu1.3: amd64 arm64 armhf i386 ppc64el s390x
Download any one of these from http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/
- libssl1.1_1.1.1-1ubuntu2.1~18.04.17_amd64.deb 2022-05-04 16:34 1.2M
- libssl1.1_1.1.1-1ubuntu2.1~18.04.18_amd64.deb 2022-05-18 12:09 1.2M
- libssl1.1_1.1.1f-1ubuntu2.13_amd64.deb 2022-05-04 16:34 1.3M
- libssl1.1_1.1.1f-1ubuntu2_amd64.deb 2020-04-21 14:33 1.3M
- libssl1.1_1.1.1j-1ubuntu3.5_amd64.deb 2021-08-24 15:39 1.3M
- libssl1.1_1.1.1j-1ubuntu3.6_amd64.deb 2021-11-26 14:45 1.3M
- libssl1.1_1.1.1j-1ubuntu3_amd64.deb 2021-03-25 17:08 1.3M
- libssl1.1_1.1.1l-1ubuntu1.3_amd64.deb 2022-05-04 16:34 1.4M
- libssl1.1_1.1.1l-1ubuntu1_amd64.deb 2021-09-10 10:54 1.4M
I choose libssl1.1_1.1.1l-1ubuntu1.3_amd64.deb, since I used this previously in Impish(21.10)
cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1l-1ubuntu1_amd64.deb
sudo dpkg -i ./libssl1.1_1.1.1l-1ubuntu1_amd64.deb
rm -i libssl1.1_1.1.1l-1ubuntu1_amd64.deb
fIwJlxSzApHEZIl
Updated on January 04, 2023Comments
-
fIwJlxSzApHEZIl over 1 year
Here are the standard installation instructions from the website:
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
userwork@userwork-thinkpad:~/Downloads$ sudo apt install -y mongodb-org Reading package lists... Done Building dependency tree... Done 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-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 mongodb-org-shell : Depends: libssl1.1 (>= 1.1.1) but it is not installable E: Unable to correct problems, you have held broken packages.
I tried installing the dependency directly but it doesn't seem to have fixed the issue:
userwork@userwork-thinkpad:~/Downloads$ sudo apt install libssl1.1 Reading package lists... Done Building dependency tree... Done Reading state information... Done libssl1.1 is already the newest version (1.1.0g-2ubuntu4). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
-
Admin almost 2 yearsIsn't it unsafe to add the entire security repo for a different Ubuntu version?
-
Admin almost 2 yearsI've found no alternative at the moment. Anyway, because of the same concern I immediately deleted the repo entry after I installed the needed package...
-
Admin almost 2 yearsAnother alternative would be to install MongoDB as a Docker container, and forward the relevant ports.
-
Admin almost 2 yearsLibssl1.1 allowed me to install RStudio on PopOS 22.04!
-
Admin almost 2 years@Javier would you mind to add the command to remove the repo?
-
Admin almost 2 years@TheTanic Just comment or delete the repo line in
etc/apt/sources.list
. -
Admin almost 2 yearsDelete the impish-security.list file in /etc/apt/sources.list.d/ post installation