1

I have tried installing mongodb using official repos but I always get the same error.

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

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

sudo apt-get udate

sudo apt-get install -y mongodb-org

But the package manager is unable to find and install mongodb-org:

sudo apt-get install -y mongodb-org

Leyendo lista de paquetes... Hecho

Creando árbol de dependencias       

Leyendo la información de estado... Hecho

E: No se ha podido localizar el paquete mongodb-org

I followed the instructions of the official documentation without success.

Linux Ubuntu-WS 4.8.0-32-generic #34-Ubuntu SMP Tue Dec 13 14:30:16 UTC 2016 i686 i686 i686 GNU/Linux

2
  • Was there an error when running sudo apt-get update? I'm pretty sure you want this URL in the echo command instead: http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.5/. Jan 2, 2017 at 21:38
  • @Zacharee1 Before making the change there was no error, but then there was a certificate error. I'm thinking it's an arch error. Jan 3, 2017 at 0:29

2 Answers 2

1

As far as i know there is no package for mongo 3.4 in 16.10 yet.
You can only get 2.4 from ubuntu packages http://packages.ubuntu.com/yakkety/mongodb

just run

sudo apt install mongodb-server

1

pre-installation:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list 
sudo apt-get update

The error comes from the -y flag:

sudo apt-get install -y mongodb-org

Instead, you can use:

sudo apt-get install mongodb-org

and than manualy accept, or to allow unauthenticated by:

sudo apt-get install -y --allow-unauthenticated mongodb-org

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .