GPG error in Ubuntu update [duplicate]

When I run the sudo apt-get update, it results in the following

 Reading package lists... Done W: GPG error: lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A1715D88E1DF1F24 W: GPG error: lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 551CE2FB4CBEDD5A W: GPG error: lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1E9377A2BA9EF27F

By googling I came to know the key is missing, and it can be obtained by running the following command with the corresponding hexadecimal numbers

 saikirangvr@ubuntu:~$ sudo gpg --keyserver subkeys.pgp.net --recv 551CE2FB4CBEDD5A

But I was not able to fix this as this gave me the error

gpg: WARNING: unsafe ownership on configuration file `/home/saikirangvr/.gnupg/gpg.conf'
gpg: external program calls are disabled due to unsafe options file permissions
gpg: keyserver communications error: general error
gpg: keyserver receive failed: general error

I tried many times but I was unable to fix. I was behind a proxy server in my college and I have configured the Ubuntu well to use behind the proxy.

After using

 sudo chown -R saikirangvr:saikirangvr /home/saikirangvr/.gnupg

the problem of unsafe ownership was gone, and it gave the following....

 sai@ubuntu:~/gpgpu-sim/ispass2009-benchmarks$ gpg --keyserver keyserver.ubuntu.com --recv 1E9377A2BA9EF27F gpg: requesting key BA9EF27F from hkp server keyserver.ubuntu.com gpgkeys: key 1E9377A2BA9EF27F not found on keyserver gpg: no valid OpenPGP data found. gpg: Total number processed: 0 sai@ubuntu:~/gpgpu-sim/ispass2009-benchmarks$ gpg --keyserver subkeys.pgp.net --recv 1E9377A2BA9EF27F gpg: requesting key BA9EF27F from hkp server subkeys.pgp.net gpgkeys: key 1E9377A2BA9EF27F not found on keyserver gpg: no valid OpenPGP data found. gpg: Total number processed: 0

the result of adding the ppa

sai@ubuntu:~$ sudo add-apt-repository ppa:nilarimogard/webupd8
[sudo] password for sai:
Error reading Couldn't resolve host 'launchpad.net'

same error occurs when using launch pad get keys

 sai@ubuntu:~$ sudo launchpad-getkeys Please wait... launchpad-getkeys is running an update so it can detect the missing GPG keys Trying to import all the missing keys gpg: requesting key 4C9D234C from hkp server keyserver.ubuntu.com gpgkeys: key 531EE72F4C9D234C not found on keyserver gpg: no valid OpenPGP data found. gpg: Total number processed: 0 gpg: requesting key BA9EF27F from hkp server keyserver.ubuntu.com gpgkeys: key 1E9377A2BA9EF27F not found on keyserver gpg: no valid OpenPGP data found. gpg: Total number processed: 0 launchpad-getkeys has finished importing all missing GPG keys. Try running sudo apt-get update - you shouldn't see any key errors anymore

What is the problem. *Is there any other method to solve this like through GUI *.......

1

2 Answers

Try the following :

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install launchpad-getkeys

Once installed, to import all the missing GPG keys for your PPAs, simply use the following command:

$ sudo launchpad-getkeys

It will run an update and try to import all missing GPG keys for you. After executing it, hope you don't see any GPG errors.

The link is a reference to the solution.

3

Fix the ownership of the .gnupg directory:

sudo chown -R saikirangvr:saikirangvr /home/saikirangvr/.gnupg

After that repeat the key importing command.

By the way, the gpg command has to be issued without sudo, in this way you will not break your file's ownership.

8

You Might Also Like