[Solved] ‘Public key is not available’ error on apt-get update in Ubuntu

I came across this error while doing sudo apt-get update

W: GPG error: http://ppa.launchpad.net karmic Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 5A9BF3BB4E5E19B8
W: GPG error: http://ppa.launchpad.net karmic Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9ABD05E22847688C


This made me do some hunting on the web. I tried quite a few solutions out of which the following worked.

Run the following command in terminal:

gpg –keyserver subkeys.pgp.net –recv 5A9BF3BB4E5E19B8
gpg –export –armor 5A9BF3BB4E5E19B8 | sudo apt-key add –

Replace 5A9BF3BB4E5E19B8 with your own key. This solved the error. I repeated the procedure for second key and I stopped getting error messages.

On the first command, sometimes the server maybe down. In that case you can try the following servers.

hkp://subkeys.pgp.net
hkp://pgp.mit.edu
hkp://pool.sks-keyservers.net
hkp://keys.nayr.net
http://keys.gnupg.net

To use these servers just replace subkeys.pgp.net with any of the server above. For eg;

gpg –keyserver http://keys.gnupg.net –recv 5A9BF3BB4E5E19B8

Source:
http://gentoo-blog.de/ubuntu/ubuntu-gpg-error-httpppalaunchpadnet-intrepid-release/

Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *