Description
I tried to install .deb
package as mentioned on https://www.mongodb.com/docs/mongodb-shell/install/#std-label-mdb-shell-install
but on running
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
it says
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
the I did
curl https://www.mongodb.org/static/pgp/server-6.0.asc
cat server-6.0.asc | gpg --dearmor > server-6.0.gpg
sudo mv server-6.0.gpg /usr/share/keyrings/
sudo echo "deb [signed-by=/usr/share/keyrings/server-6.0.gpg] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
and then finally
sudo apt-get install -y mongodb-mongosh
and everything working fine