First Step:

ubuntu@ip-10-10-1-196:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
sudo: unable to resolve host ip-10-10-1-196
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.Nxbg2NlmyB --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/ansible-ansible.gpg --keyring /etc/apt/trusted.gpg.d/ondrej-php.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
gpg: requesting key EA312927 from hkp server keyserver.ubuntu.com
gpg: key EA312927: public key "MongoDB 3.2 Release Signing Key   <packaging@mongodb.com>" imported
gpg: key EA312927: "Totally Legit Signing Key <mallory@example.org>" not changed
gpg: Total number processed: 2
gpg:               imported: 1  (RSA: 1)
gpg:              unchanged: 1

Second Step

ubuntu@ip-10-10-1-196:~$ echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list
tee: /etc/apt/sources.list.d/mongodb-org-3.2.list: Permission denied
deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse

Third Step:

ubuntu@ip-10-10-1-196:~$ sudo apt-get update
W: GPG error: https://repo.mongodb.org xenial/mongodb-org/3.6 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 58712A2291FA4AD5

Trying to Install

ubuntu@ip-10-10-1-196:~$ sudo apt-get install mongodb-org
sudo: unable to resolve host ip-10-10-1-196
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  mongodb-org : Depends: mongodb-org-shell but it is not going to be installed
           Depends: mongodb-org-server but it is not going to be installed
           Depends: mongodb-org-mongos but it is not going to be installed
           Depends: mongodb-org-tools but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.

I am stuck, tried installing them manually but can't , I have Ubuntu 16.04 Xenial

  • Please run sudo apt-get install -f and try again! Aug 27, 2018 at 20:03
  • still same @GeorgeUdosen, i tried with the above command Aug 28, 2018 at 5:27
  • Run sudo dpkg --configure -a Aug 28, 2018 at 5:46


Your Answer

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

Browse other questions tagged or ask your own question.