Resolving GPG Errors When Using Apt-Get

gpg

When updating your software you may encounter an error that the public key is not available for a particular repository on your desktop or server. There are some simple steps you can take to add the public key to your  key database. 

Error:
W: GPG error: http://extras.ubuntu.com precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192

Fix:

Replace the 16 digit code in the example with the characters supplied at the end of the error message.

Run:

gpg --keyserver subkeys.pgp.net --recv 16126D3A3E5C1192

Response:

gpg: requesting key 3E5C1192 from hkp server subkeys.pgp.net
gpg: key 3E5C1192: public key "Ubuntu Extras Archive Automatic Signing Key " imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1

Run:

gpg --export --armor 16126D3A3E5C1192 | sudo apt-key add -

Response:

OK

About Brian Aldridge

I am a software developer and podcaster. Catch me weekly on Infection - The Survival Podcast at https://infectionpodcast.com

Leave a Reply