I am not able to install MongoDB on Ubuntu 22.04. I am following the official documentation for the installation.
This is the output I am getting after following the installation instructions:
Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg),
see the DEPRECATION section in apt-key(8) for details. 8 3 Answers
Below solution worked for me to install mongodb
1.install libssl1.1
echo "deb impish-security main" | sudo tee /etc/apt/sources.list.d/impish-security.list
sudo apt-get update
sudo apt-get install libssl1.12.then install mongodb-org-server_5.0.7_amd64.deb downloaded from mongodb.com
Instructions used from this link to install libssl1.1 in Ubuntu 22.04 LTS
The commands your're using do not work on Ubuntu Jammy(22.04 LTS), those are only suitable for Ubuntu Focal(20.04 LTS). The Mongodb team is still working on the support for Ubuntu Jammy(x86), you can follow the status of this issue on
Installing libs1.1 worked for me as well
sudo apt-get update
sudo apt-get install libssl1.1then type
sudo apt-get install mongodb-org -yWorks for me on Ubuntu Jammy 22.04
1