2

I'm trying to install MongoDB on Ubuntu 22.04 using this command:

sudo apt-get install -y mongodb-org

But I'm getting this error:

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 E: Unable to correct problems, you have held broken packages.

Any idea on how to fix this? Thanks!!

  • 1
    The use of -y is not recommended unless you fully understand the potential consequences. – user535733 Oct 29 '22 at 15:47
  • Please see: https://askubuntu.com/a/842599/231142 MongoDB is not ready for Jammy yet so you need to use the Focal repos for now. It is at the bottom of that answer in the 22.04 and MongoDB 6.0 – Terrance Nov 01 '22 at 23:10

2 Answers2

2

One option would be to download the libssl1.1_1.1.1f package and manually install it via Terminal with:

sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
matigo
  • 22,138
  • 7
  • 45
  • 75
0

You tried this 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

Reference: https://www.mongodb.com/community/forums/t/installing-mongodb-over-ubuntu-22-04/159931/3