Installing mongodb over Ubuntu 22.04

Tried everything but no luck .Feel like the Mongo team does not want to fix it as the CE is a competitor to their Atlas … Any ideas for alternatives?

Do we have an official release yet?

Are we there yet? :laughing: Sadly not…

1 Like

Hi, any updates? about this issue when is the release expexted?

It is working now. My mistake was tring to install from the “software install” .
first downlod the lib from here
http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
next open terminal and to to the download lib location then
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb

thanks to @Geoffrey_Mungai

1 Like

for me below was worked.

echo “deb Index of /ubuntu focal-security main” | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt-get update
sudo apt-get install libssl1.1

Finally! Below Solutions worked for me

It is because of the missing dependencies mongodb not installing on ubuntu 22.04.
The main reason is the missing of libssl1.1 dependency. So we need to install it seperately.

1.sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common

2.echo "deb http://security.ubuntu.com/ubuntu impish-security main" | sudo tee /etc/apt/sources.list.d/impish-security.list

3.Go to root user sudo -i then paste this wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb

4.apt update

5.apt install libssl1.1

6.wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -

7.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

8.apt update

9.apt install -y mongodb-org

The latest version of mongodb will be installed
To start it

1.systemctl enable mongod

2.systemctl start mongod

In case MongoDB doesn’t start run the command below to reload.

systemctl daemon-reload

2 Likes

I have been using ubuntu in 20.04 and now I want to use it in 22.04 but the actual support of mongodb for Ubuntu 22.04 isn’t released yet. Any reason why the delay of the release for Ubuntu 22.04.

I was able to easily install mongosh on Linux Mint 21. It should be the same instructions for Ubuntu 22.04:

sudo curl https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-key.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 update

sudo apt install mongodb-mongosh
1 Like

Nice workaround!! I’ll take it. Sounds like you’ve understood the impacts of the replaced dependencies.

Hi,
This worked for me.
But my concern is I am not able to open mongodb shell using in terminal i tried both the commands,
mongo : showing Command ‘mongo’ not found
mongodb : showing this error.

Please let me know how to use mongodb shell in ubuntu 22.04.
I checked the status of mongodb its showing active.

Thanks,
Sandip R.

The mongo command line shell is no longer available in MongoDB 6.0. You want to use the newer mongosh shell. It should have been installed when you installed MongoDB, but if not you can download it separately.

The screenshot shows you ran the mongod command. This is the MongoDB database engine process. Since the process was already running using the defaults, a second instance could not be started and should have failed with a message in the logs similar to Address already in use.

Do you have an estimation when mongo v6.2 will be released?

This one is worked for me .
Thank You!!

Step 5 does not work for me.

apt install libssl1.1
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package libssl1.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘libssl1.1’ has no installation candidate

Package libssl1.1 is not available, but is referred to by another package

How are you guys getting past this?

I was able to manually download and install the libssl1.1 package:

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

Having said that though, this package has been deprecated in Ubuntu 22.04 which is why it’s not available anymore.

SERVER-62300 has been marked as CLOSED at the end of last month, so hopefully there will be a native Ubuntu 22.04 method of installation soon.

@Stennie_X, can you check with the team to see when Ubuntu 22.04 will be able to install MongoDB without jumping through hoops?

3 Likes

yep exactly, seeing so many workarounds is a recipe of disaster indeed

1 Like

Hello

Is MongoDB v4.0 supported on Ubuntu 22.04 (Jammy) ?

Regards
Ani

Hello @Aniruddha_Kulkarni and welcome to the MongoDB Community forums! :wave:

MongoDB 4.0.x is no longer supported on any platform. That version reached end of life in April of this year. Check out the MongoDB Software Lifecycle Schedules page to see how long each version will be supported for.

1 Like