Installing mongodb over Ubuntu 22.04


These days Ubuntu published their new long term supported version, 22.04, and it is not possible to install mongodb because they don’t support libssl1.1 anymore:

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

I googled it, but I did not find anywhere nobody who could solve this problem. Any ideas?
Thank you!

Are you following these directions?

Yes, but it’s a dependency problem. I tried mongo 4.4 and 5.0, to no avail: same error on both.

1 Like

Aha. I’m on 20.0x and haven’t upgraded to 22 yet. I’m sure @Stennie will have the answer!

1 Like

This worked for me

echo "deb impish-security main" | sudo tee /etc/apt/sources.list.d/impish-security.list
sudo apt-get update
sudo apt-get install libssl1.1

Just apt installing openssl 1.1 sounds like a recipe for disaster.
Ubuntu 22.04 already has openssl 3 installed.
I think a MongoDB team member had best respond to this issue with a recommended path
@Stennie ?

Hi folks,

Ubuntu 22.04 was released less than a week ago so doesn’t have official MongoDB packages available yet. The build team is aware and will set up appropriate packaging & testing infrastructure to validate new packages.

Relevant Jira issues to watch are:

I don’t have a specific ETA to share at the moment, but I’d generally recommend waiting for essential software packages to be available before committing to major O/S upgrades.

If you are an early adopter of a new O/S release, suggested interim workarounds would be:

  • Run your MongoDB deployment on separate hosts with supported O/S versions (eg 20.04 LTS)

  • Run MongoDB in a container/VM with a supported O/S version

  • Use a hosted version of MongoDB (eg MongoDB Atlas) so you have fewer direct dependencies on O/S updates

All of these approaches use official binaries, so you are less likely to run into novel issues.

For a development environment you could also consider:

However, I would be very wary of mixing & matching packages intended for different O/S versions (especially for a production environment) as those combinations have not been thoroughly tested.



Ok, thank you! Will wait for the support then. Out of ignorance, may I ask if generating a snap instead of a deb could solve the dependency problem and other possible library conflicts?

Thanks, It worked for me as well!!

Hi there, hope you’re doing well. I’m currently using MongoDB in Docker and it is good enough while waiting for new update from the MongoDB team.

to start MongoDB (automatically restart):
sudo docker run -dp 27017:27017 -v local-mongo:/data/db --name local-mongo --restart=always mongo

To access into running local-mongo container:
sudo docker exec -it local-mongo sh

Then type mongo and you’re good to go!


This worked for me as well. Still waiting for offcial release.

1 Like

Can you drop the process of installing mongodb on docker ??

Hi Alexander, I’ve already posted the process above. I’ll re-post it in case you didn’t see it:
sudo docker run -dp 27017:27017 -v local-mongo:/data/db --name local-mongo --restart=always mongo

Thank you. Will try it now