I was trying to get the official mongodb for Ubuntu, following the instructions at http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
After adding the deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
line in my sources, I need to add the pgp key since synaptic says
W: GPG error: http://downloads-distro.mongodb.org dist Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9ECBEC467F0CEB10
Again following instructions, I did
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv 7F0CEB10
this says
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 7F0CEB10
gpg: requesting key 7F0CEB10 from hkp server keyserver.ubuntu.com
?: keyserver.ubuntu.com: Connection refused
gpgkeys: HTTP fetch error 7: couldn't connect: Connection refused
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
Interestingly, I also get
$ apt-key list
gpg: fatal: /home/myname/.gnupg: directory does not exist!
secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768
How can I get apt to use this source?
Update
Just copying the key on the webpage at http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages to, say k.txt
and then doing
sudo apt-key add k.txt
works!
Also, the apt-key list needed a sudo.
However, that still doesn't tell me why apt-get cant get keys from keyserver.ubuntu.com
Best Answer
gpg
is probably using a port that's blocked by your (or an upstream) firewall. From this page which I found by googling 'keyserver.ubuntu.com: Connection refused':The bug is fixed by default in 11.04, and the author references a couple of possible interim fixes. If that's not it, then maybe keyserver.ubuntu.com was down for some reason?