How to fix the "W: GPG error" error

error w_errordegpg

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

Screenshot from 2016-03-29 16:00:18

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 🙂

 


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

14 comments, leave yours

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   manuti said

    In the solution via Terminal, I think the checker has converted the options preceded by double dash `–` to` –` long dashes.

    A greeting and thanks for the help.

  2.   Hilmar Miguel Say Garcia said

    Sorry to make a different query on the subject, my query is on the right notification menu of the desktop, what is called and if it is available for Unity, greetings.

  3.   Mr. Paquito said

    I just wanted to comment that neither of the two ways that the article exposes is infallible. I explain:

    On one occasion I had this problem and it was impossible to fix it with the console method that the article exposes, I ran it several times, I made sure I had done it right and there was no way. Consulting the internet, I read that it could also be fixed with y-ppa-manager, I tried it and it fixed it the first time. That is to say, they are complementary rather than alternative methods, it is usual that where one fails the other triumphs.

    That said, coincidentally, a few days before this article was published (specifically on 23/03/2016), another on the same topic was published on ubuntuleon.com (http://www.ubuntuleon.com/2016/03/que-hacer-cuando-te-sale-un-w-error-de.html) where the console method was exposed. As this had already happened to me and that method had not worked for me, I wanted to share my experience with y-ppa-manager in the comments and, abounding in possible solutions, another colleague exposed a third more aggressive method (and with more risk as well , about which he warns), but also more expeditious, in case neither of the previous two worked.

    Greetings.

  4.   Louis Ernesto Salazar said

    Can someone tell me how I get the Screenlet of this POST screen?

  5.   Nicole munoz said

    I tried the console method and it didn't work. With the Y PPA MANAGER if I work on tap!

  6.   Alexis Munoz said

    The console method did not work for me. The y-ppa manager yes! right now.
    it won't let me install the repository but now it's fine!

  7.   give it said

    The command that worked for me is the following:

    ~ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv (public key)

    [keymaster@google.com> »1 new subkey
    gpg: Total number processed: 1
    gpg: new subkeys: 1
    gpg: new signatures: 3]

    Greetings and thank you very much.

  8.   Fyodor said

    Thank you very much, I was able to solve the problem !!!

  9.   The Russian said

    Hello, it happens to me that when I use the command, the following message appears, so it does not finish giving new keys:
    gpg: key EF0F382A1A7B6500: public key "[User ID not found]" imported
    gpg: Total number processed: 1
    gpg: imported: 1
    gpg: Warning: 1 key skipped due to its large size
    gpg: Warning: 1 key skipped due to its large size

    Does anyone know how I could work around this step?

    Thank you very much

  10.   Vestalin said

    With the Y PPA MANAGER it worked directly !!! Thank you very much, I already thought about uninstalling everything! 🙂

  11.   Vestalin said

    ... Thank you, I was thinking of uninstalling everything! 🙂 and with the y-ppa it worked directly ...

  12.   Javier Yanez said

    A crack! The graphical solution worked perfect.

  13.   Julio said

    Thank you very much, the graphic part has worked for me. The option to do it by terminal has not worked for me, I suppose that from what they comment that the two scripts have been transformed into a single long script.

  14.   f_leonardo said

    Thank you very much!
    The graphical solution worked perfect and very fast for me in Ubuntu 20.04