At Ubunlog we want to show you how we can fix a bug that at first glance seems painful to fix, but can actually be fixed running a couple of commands and through a graphical tool We will also talk about it.
And is that sometimes, when we work with a repository (or some package) either to install it, update it or even update our list of repositories through sudo apt-get update, The error that we mentioned in the title of this article may appear. As we have said, it is very easy to fix it. We will tell you.
As you can see in the image that heads this article, the error shown tells us the following:
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures could not be verified because your public key is not available: NO_PUBKEY ABCDEFGH12345678
Solution via Terminal
To solve it through the terminal we have to consult a valid public key to a secure Ubuntu server, which we can do using the following command:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABCDEFGH12345678
Where ABCDEFGH12345678 is the key that the error informs us that it is rejecting us.
In addition, for each of the keys that we see that rejects us (which can be more than one) we have to execute the following command:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
Graphical Solution (AND PPA Manager)
As we told you in the introduction to the article, there is also a way to solve this error graphically through the program And PPA Manager. It is a PPA repository manager that will take care of update all keys to valid keys, and consequently ending the error that we want to get rid of. To install it we can easily do it by running:
sudo add-apt-repository ppa: webupd8team / y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager
Once installed, we have 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 has worked correctly, all our keys should be restored without problems, and when re-running sudo apt-get update the error should no longer appear to us.
Anyway, we hope that this article has helped you get rid of this error that is so strange and so difficult to solve it seems at first. As we have seen, we can fix it from the terminal using apt key or through the graphic tool And PPA Manager. If you have any questions or the error persists, let us know in the comments section. Until next time 🙂