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