2 / 18
Jul 2022

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 http://security.ubuntu.com/ubuntu 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 - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu 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

4 months later
9 days later

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:

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

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 http://security.ubuntu.com/ubuntu 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).

11 days later

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 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list

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

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 https://pgp.mongodb.com/server-6.0.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-6.0.gpg or wget -qO - https://pgp.mongodb.com/server-6.0.asc | 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.

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.

25 days later

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 - https://pgp.mongodb.com/server-6.0.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-6.0.gpg echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu 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://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.1 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

Closed on Jan 11, 2023

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