0

I followed the official doc here:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

did the following step:

wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | sudo apt-key add -

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

sudo apt-get update

sudo apt-get install -y mongodb-org=3.4.2 mongodb-org-server=3.4.2 mongodb-org-shell=3.4.2 mongodb-org-mongos=3.4.2 mongodb-org-tools=3.4.2

I got the following error:

E: Version '3.4.2' for 'mongodb-org' was not found
E: Version '3.4.2' for 'mongodb-org-server' was not found
E: Version '3.4.2' for 'mongodb-org-shell' was not found
E: Version '3.4.2' for 'mongodb-org-mongos' was not found
E: Version '3.4' for 'mongodb-org-tools' was not found

Please help!

  • 2
    The lowest version of MongoDB for Focal is 4.2 or 1.0. None of the version 3 or 2 are available for Focal 20.04. http://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/ Only Xenial 16.04 goes back to 3.4. http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/ but Xenial is about to go EOL soon. – Terrance Apr 12 '21 at 21:05
  • @Terrance thank you! I will have to find a way around it then. Do you happen to know how? the reason why I am trying to install mongo 3.4 is because mongo kept giving me shell & server does not match error, more detailed description here: https://askubuntu.com/questions/1331424/mongo-shell-server-version-does-not-match-in-linux-problem – yutoliho Apr 14 '21 at 20:14
  • I guess that you could try https://askubuntu.com/a/842599/231142 for the 16.04 and change the numbers from 4.0 to 3.4. – Terrance Apr 14 '21 at 20:18

0 Answers0