Installing MongoDB 6.x on Debian 9 - possible?

Hi folks, I’m just trying to install the latest version of MongoDB that’s available for Debian 9 stretch. I’m seeing conflicting information in the documentation about which version is available (MongoDB 5.0 or 6.0).

I have successfully installed MongoDB 5.0.15 following the instructions here and replacing the ‘6.0’ in the URLs to ‘5.0’.

Trying ‘6.0’, the apt-get install command says: E: Unable to locate package mongodb-org

The link above is the official installation tutorial, and it claims that it is possible to install MongoDB 6.0 on Debian 9 stretch. But, the following two links seem to not have greater than versions 5.0 for Debian 9:

  1. Download MongoDB Community Server | MongoDB (MongoDB 6.0 is not available on Debian 9)
  2. MongoDB Community Downloads | MongoDB (MongoDB 5.0.14 seems to be the latest version available on Debian 9)

My question is, is it possible to install MongoDB 6.0 on Debian 9, or is 5.0.15 the latest version available? If it’s the latest version available, then maybe the documentation needs to be updated (in the installation tutorial)?

If it is possible, then please share how to get past the unable to locate package mongodb-org message. Here are the exact steps I follow:

wget -qO - | sudo apt-key add -

echo "deb stretch/mongodb-org/6.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list

sudo apt-get update

sudo apt-get install -y mongodb-org