First I used the documentation of Ubuntu. https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
Step1: After that I ran commands according to documentation.
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
I got the following result:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
After that I used the command to upgrade and update everything.
After that I ran:
sudo apt-get install -y mongodb-org
I got error:
Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
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
E: Unable to correct problems, you have held broken packages.
How can I solve this issue??
sudo apt-get updateandsudo apt-get install libssl1.1: https://askubuntu.com/questions/1403619/mongodb-install-fails-on-ubuntu-22-04-depends-on-libssl1-1-but-it-is-not-insta – Vomit IT - Chunky Mess Style Jul 03 '22 at 02:15