How to install Mongo 3.4 on Ubuntu 18.04 bionic

Viewed 8233

So the things I have tried are:

1)

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

2)

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

3)

sudo apt-get update

4)

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

But I got this error:

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

I have read the other article about this, but it did not work for me and I don't want to use a docker image.

1 Answers

ok so the things to do to install this version are

Step 1

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

Step 2

echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

Step 3

sudo apt update

Step 4

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

here is the really helpful source: https://askubuntu.com/questions/1089312/install-and-use-mongodb-3-4-17-on-ubuntu-18-04

Related