At Ubunlog we want to teach you how we can fix an error which at first glance seems painful to fix, but which can actually be fixed executing a couple of commands o through a graphical tool which we will also talk about.
And is that sometimes, when we work with some repository (Or some package) either to install it, update it or even update repository list using sudo apt-get update, we may see the error we mentioned in the title of this article. As we told you, it is very easy to fix. We tell you.
As you can see in the image that heads this article, the error that is shown to us tells us the following:
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures could not be verified because the public key is not available: NO_PUBKEY ABCDEFGH12345678
Solution through the Terminal
To solve this through the terminal we must consult a valid public key on a secure Ubuntu server, which can be done using the following command:
sudo apt-key adv -keyserver keyserver.ubuntu.com -recv-keys ABCDEFGH12345678
Where ABCDEFGH12345678 is the key the error informs us that it is rejecting us.
Besides, for each of the keys we see rejecting us (Which can be more than one) we have to run the following command:
sudo apt-key adv -keyserver keyserver.ubuntu.com -recv-keys
Graphic solution (I PPA Manager)
As we told you in the introduction of the article, there is also a way to fix this error graphically through the program I PPA Manager. This is a PPA repository manager that will take care of us upgrade all keys to valid keys, And consequently ending the error we want to get rid of. To install we can do it easily by running:
its add-apt-repository ppa: webupd8team / i-ppa-manager
sudo apt-get update
sudo apt-get install i-ppa-manager
Once installed, we need to enter Advanced, And once inside we have to click on Try to import all GPG keys, And wait for the process to finish. If everything worked correctly, all our keys should be restored without any problems, and when running again a sudo apt-get update the error should no longer reappear to us.
Anyway, hopefully this article has helped you get rid of this bug that is so weird and so hard to fix it seems at first. As we have seen, we can fix from the terminal using apt-key or through the graphical tool I PPA Manager. If you have any questions or the error persists, let us know in the comments section. Until the next 🙂