Showing posts with label apt-get. Show all posts
Showing posts with label apt-get. Show all posts

Friday, June 5, 2009

NO_PUBKEY? During apt-get update

This happens to me pretty frequently, as I jump over different repositories to get ubuntu packages:

W: GPG error: http://ppa.launchpad.net jaunty Release: The following
signatures couldn't be verified because the public key is not
available: NO_PUBKEY 2836CB0A8AC93F7A
W: You may want to run apt-get update to correct these problems


Note this happens during apt-get update, so running it is not the solution!

Assuming this is a repository you trust on, let us just add this key to your ubuntu so you can download updates from there:

  1. $ gpg --keyserver keyserver.ubuntu.com --recv 2836CB0A8AC93F7A
    gpg: requesting key 8AC93F7A from hkp server keyserver.ubuntu.com
    gpg: key 8AC93F7A: public key "Launchpad Kubuntu Updates" imported
    gpg: Total number processed: 1
    gpg: imported: 1 (RSA: 1)
    (The number 2836CB0A8AC93F7A is the key listed as missing in the error message)

  2. $ gpg --export --armor 2836CB0A8AC93F7A | sudo apt-key add -
    OK
    (Again, replace that value by your key)



Voila. Run apt-get update again and you should be able to receive that repositories' packages.

Update: palo points out you can do the same with just this line:
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 2836CB0A8AC93F7A
And that's even shorter -- thanks!