sql >> Base de Datos >  >> NoSQL >> MongoDB

E:No se puede localizar el paquete mongodb-org

Enfrenté el mismo problema, pero lo solucioné cambiando el comando de la sección del archivo del paquete. Todo el paso que seguí fue:

Primero intente con este comando:sudo apt-get install -y mongodb

Este es el paquete mongodb no oficial provisto por Ubuntu y no es mantenido por MongoDB y entra en conflicto con los paquetes admitidos oficialmente por MongoDB.

Si el comando anterior no funciona, puede solucionar el problema mediante uno de los siguientes procedimientos:

#Step 1:  Import the MongoDB public key
#In Ubuntu 18.*+, you may get invalid signatures. --recv value may need to be updated to EA312927. 
#See here for more details on the invalid signature issue: [https://stackoverflow.com/questions/34733340/mongodb-gpg-invalid-signatures][1]

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

#Step 2: Generate a file with the MongoDB repository url
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

#Step 3: Refresh the local database with the packages
sudo apt-get update

#Step 4: Install the last stable MongoDB version and all the necessary packages on our system
sudo apt-get install mongodb-org

         #Or
# The unofficial mongodb package provided by Ubuntu is not maintained by MongoDB and conflict with MongoDB’s offically supported packages. Use the official MongoDB mongodb-org packages, which are kept up-to-date with the most recent major and minor MongoDB releases.
sudo apt-get install -y mongodb 

Espero que esto funcione para ti también. Puedes seguir este MongoDB

Actualizar Las instrucciones anteriores instalarán la versión mongodb 2.6, si desea instalar la última versión para Uubuntu 12.04 luego simplemente reemplace arriba step 2 y siga las instrucciones a continuación en lugar de eso:

#Step 2: Generate a file with the MongoDB repository url
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list

Si está utilizando Ubuntu 14.04 luego use el siguiente paso en lugar del anterior step 2

#Step 2: Generate a file with the MongoDB repository url
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list