Install (and use) mongodb 3.4.17 on ubuntu 18.04

I need to recover/read a database created in mongo 3.14. However currently I use the ubuntu 18.04 os.

I tried following the steps given by the official guide: (just replacing 4.0 with 3.4)

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64 ] bionic/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
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

However the install fails on that last command giving the errors:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '3.4.16' for 'mongodb-org' was not found
E: Version '3.4.16' for 'mongodb-org-server' was not found
E: Version '3.4.16' for 'mongodb-org-shell' was not found
E: Version '3.4.16' for 'mongodb-org-mongos' was not found
E: Version '3.4.16' for 'mongodb-org-tools' was not found

(sudo apt update doesn't help).

Now when I tried to install the files manually from the tar ball I also can't seem to find the correct version here:

3.4.17 doesn't seem to have any ubuntu 18 support.

As a final option, reading the database with a 4.x version also doesn't seem to work, as 4.x complains that the data has to be converted first to "3.6 format".

Is there any way I can read a database written in 3.4 using ubuntu 18?

1 Answer

Try this

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt update
sudo apt install mongodb-org

It installs 3.4.18 successfully. Not the version you're asking for, but should work none the less.

Good Luck!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like