How to install mongodb 6.0 on Ubuntu 22.04

Hello! I try to install mongoDB community server 6.0 on Ubuntu 22.04. Belows are my installation process.

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

wget -qO - | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list

But libssl1.1 is not installed and brings the errors when executing the installation.

sudo apt update
sudo apt install -y mongodb-org

Belows are the error messgaes.

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

So I downloaded the installation deb file from the site and execute it. But the same errors are thrown. Any reply will be thanksful. Best regards


Ubuntu 20.04 is the latest supported Ubuntu.

Keep an eye on

Use the supported platform or you can run it in Docker.

1 Like

Hi Guys, any update on what 22.04 will be supported?

1 Like

hey guys,

the following allowed me to run version 6 on ubuntu-22.10-in-a-docker-image. so in theory it should work on a real installation too.

in addition to the steps you followed, do this first:

sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb

As long as they do not break installed things, “archived” packages should always install and run without a problem. that is what happened in these lines.

Yet, keep in mind that, if you break things, the responsibility is yours because MongoDB Community 6 is not yet supported on Ubuntu 22 (is the enterprise version supported? I did not try).

PS: I found the package here: Index of /ubuntu/pool/main/o/openssl . there are a few others so check they are applicable instead of the one I use.

this also works:

echo "deb focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list

With this one, it will not even require you to know what to install. it will fetch “1.1.1f-1ubuntu2.16” for amd64. (my other answer used ubuntu2.1~18).

Please check this video…I installed Mongodb on Ubuntu 22.04 by following the step by step instructions from this video: install mongodb in ubuntu 22.04 - YouTube

Hi @Silpa_Baburajan , that video installs version 5, so I suggest you check your installation.

the OPs first post above has the commands for version 6. It seems adding focal-security to sources.list allows the installation smoothly.

As of 6.0.3 mongodb server is built for Ubuntu 22.04.

The manual is yet to be updated but very similar to the 20.04 instructions but using jammy in the repo string instead of focal.

echo "deb [ arch=amd64,arm64 ] jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
1 Like

to avoid the apt-key message:
curl -sS | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-6.0.gpg

1 Like

That is part of the regular install steps in the manual for installing version 6 on ubuntu. No point in recreating the manual in the forum.

this man page: uses apt-key which gave me a warning that apt-key is depreciated. I found this thread because all the other docs/attempts to install mongo on 22.04 failed. Is there a more current install guide to help the next guy?

I agree with @Ken_Town ,

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8))

apt-key stores all keys in a single /etc/apt/trusted.gpg which seems to have its own issues (thus deprecated). It embeds to this file the .asc key files created with gpg --armor

the suggested way to store key files is to store .gpg files under /etc/apt/trusted.gpg.d/. if we have .asc file then gpg --dearmor takes its content and gives back .gpg content.

unless we are supplied directly with .gpg file by MongoDB (so be careful in the future), it is better to use

curl -sS | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-6.0.gpg
wget -qO - | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-6.0.gpg

PS: use apt-key list and see any key under /etc/apt/trusted.gpg. use apt-key remove to remove those if you want, and add again with the above method.

1 Like

That is a good point, apt-key is deprecated.

However it is only a warning. i.e. Don’t continue to use this its going away, there is a newer way of doing it now. I’m sure it will be addressed when the docs are updated.

The point I am making is that until the documentation/manual is updated the only change required to install on Ubuntu 22.04 is changing focal to jammy. There is no additional steps, a very small deviation from what is already documented.

If you trace back the release notes and related jiras there is outstanding items relating to updating the documentation.

I followed the instructions on the video to install MongoDB 6 on Ubuntu 22.04 (replaced focal with jammy and 5.0 and 6.0) but once I started, enabled and checked the status of mongod it gave me "failed (Result: core-dump). I’m running Ubuntu 22.04 in VirtualBox. I removed the installation thinking I may have done something wrong but got the same result. I don’t know what else to do.

step by step for Ubuntu 22.04. full docs here

sudo apt dist-upgrade
sudo apt-get install gnupg
wget -qO - | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-6.0.gpg
echo "deb [ arch=amd64,arm64 ] jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl enable mongod
sudo systemctl start mongod

$ mongosh
Current Mongosh Log ID: 63b77379982aa0dc5c083475
Connecting to:          mongodb://
Using MongoDB:          6.0.3
Using Mongosh:          1.6.1

If you have an old cpu you will need to install version 4. Version 5 and 6 require avx
grep flags -m1 /proc/cpuinfo | grep avx


This post was flagged by the community and is temporarily hidden.

This is a different problem.

You should search the forum first and then open a new topic if you don’t find an answer.

Both the core-dump/Illegal Instruction and ECONNREFUSED have had much coverage in the forums.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.