[HOW-TO] Solve GPG errors in Ubuntu
If you like playing around with Ubuntu as I do you will, sooner or later, come across the annoying GPG error. In all the excitement of installing new applications, it is quite easy to miss the instruction of adding public keys, especially if you configure Ubuntu to update software from various sources. Usually, the GPG error that appears after you check for updates via the Update Manager or terminal’s sudo apt-get update does not prevent you from retrieving updates. However, wouldn’t it be better if you did not have to encounter the error at all? Well, sure! Who would say no to that? In this HOW-TO, I will share with you the steps you can take to fix the error, especially if the update source is ppa.launchpad.net.
Before proceeding, note that I have only tested this within Ubuntu 9.10 Karmic Koala. These instructions should also apply to previous versions of Ubuntu, but I cannot say how far back for sure.
- First of all, we need to grab a copy of that key number. In my case, the key number is 68A3CE6B38BD81CA. Change this key number to suite your scenario.
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 68A3CE6B38BD81CA
- Launch a terminal window (Applications > Accessories >Terminal) and execute the following commands. Press ENTER after typing in each command.
gpg --keyserver subkeys.pgp.net --recv 68A3CE6B38BD81CA
gpg --export --armor 68A3CE6B38BD81CA | sudo apt-key add -
- If everything was successful, you should not get a GPG error the next time you perform an update. Enter this final command to test.
sudo apt-get update
That’s it! I hope you find this HOW-TO helpful. Please note that I am a Linux novice. Therefore, if you know of different ways of solving this error, don’t be afraid to share within the comments.