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!

3 comments:

  1. Thanks for directing me. Here's a shortcut:
    sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com 2836CB0A8AC93F7A

    ReplyDelete
  2. @palo, you are right. I am now creating a script doing exactly that with "$1"... a very short-shortcut! Thanks!

    ReplyDelete
  3. Si tienes problemas para bajar la llave pública 2836CB0A8AC93F7A, copia todo lo siguiente a un archivo de texto, lo guardas y lo importas con la opción --import :

    -----BEGIN PGP PUBLIC KEY BLOCK-----
    Version: SKS 1.0.10

    mI0ESgMYswEEAOzc0ePR1UkVIg9dZZgl6exOQlr+pAoDIrlEmv1WX977Ciwh9GI6g2KMf3Ci
    8DY2jluksPyNWlAtG9rls0NvFyqWkRnRm68Tm8jy+/X7LTfz1YIixoO6xq+8i8YfXoWg0ZaJ
    0MjRm2s+jxZmcx199kLC3CL7sS0ui6ZOzXpuMn7FABEBAAG0GUxhdW5jaHBhZCBLdWJ1bnR1
    IFVwZGF0ZXOIRgQQEQIABgUCSk7ndwAKCRAiHJXOgzra07LlAJsH8LkuT9HLmTIeubQbMHhf
    NsS1nwCglaeK7K1qBxrS7kTIoqNPOmoDdXOItgQTAQIAIAUCSgMYswIbAwYLCQgHAwIEFQII
    AwQWAgMBAh4BAheAAAoJECg2ywqKyT96080EAMrywfPZkEa42ROjm6fiJ6hlNI4umiqJ11Vv
    myy7PkFFapzjpFq9dIYRkk23PavTRT9nKa97N8jG+Ef4HpLfrxjAb5q+e7Aj3ykEqNcQWXpJ
    ppY0TRQDiTMgBJKz3dLgSHFvRk8Rr6FI1i8ZjnkTGJd7YfkynyhA6ACEHVDDLw+s
    =VGz5
    -----END PGP PUBLIC KEY BLOCK-----



    Bye, Jpgo_Chile

    ReplyDelete