apt-get Errors

By | 21 Jan 2009

If you get the following error while updating the package list:

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 632D16BB0C713DA6Code language: PHP (php)

You need to manually update the key. The key-ID is the last 8 digits of the key, in this case: 0c713da6.

Now fetch the key from the Ubuntu keyserver:

gpg --keyserver keyserver.ubuntu.com --recv 0c713da6Code language: CSS (css)

And finally add the new key to the apt-keyring:

gpg --export --armor 0c713da6 | sudo apt-key add -Code language: JavaScript (javascript)

You can even automate this a bit with the following shell script:

#!/bin/bash
KEYID=${1:-8}
gpg --keyserver keyserver.ubuntu.com --recv $KEYID
gpg --export --armor $KEYID | sudo apt-key add -Code language: PHP (php)

This will only use the last 8 digits of the first parameter as KEYID. So you can even call it with the full 16 digits.

Leave a Reply

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

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.