3

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

 Reading package lists... Done
 W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A1715D88E1DF1F24
 W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 551CE2FB4CBEDD5A
 W: GPG error: http://ppa.launchpad.net 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 https://launchpad.net/api/1.0/~nilarimogard/+archive/webupd8: 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 *.......

dessert
  • 39,982
sai kiran grandhi
  • 193
  • 1
  • 6
  • 14
  • you might have done a mistake similar to me. While installing Maven, I followed steps mentioned here: http://www.sysads.co.uk/2014/05/install-apache-maven-3-2-1-ubuntu-14-04/ except the last step i.e. "Step 5: Remove PPA from sources.list" As a result of this I was getting GPG error similar to yours. – Kaushik Acharya Mar 21 '15 at 15:29

2 Answers2

2

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.

shivshnkr
  • 5,063
  • tried the link http://www.webupd8.org/2011/02/launchpad-getkeys-gets-proxy-support.html but got the error sudo: launchpad-getkeys: command not found – sai kiran grandhi Sep 07 '13 at 17:07
  • first u need to add repository, then run apt-get update so that package list can be updated, thereafter u need to install launchpad-getkeys. I too use internet connection that is behind proxy but it works fine for me. – shivshnkr Sep 07 '13 at 17:51
  • I have updated the question with the errors I got, can you please help me....... – sai kiran grandhi Sep 14 '13 at 06:26
1

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.

Frantique
  • 8,493
  • It gave the following result for all the three keys I required.....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 – sai kiran grandhi Sep 05 '13 at 05:27
  • I followed the link ......http://stackoverflow.com/questions/13112400/gpgkeys-key-7f0ceb10-not-found-on-keyserver-while-installing-mongodb-on-ubunt ,and gave me the error gpgkeys: HTTP fetch error 6: Couldn't resolve host 'keyserver.ubuntu.com' can you please help me... – sai kiran grandhi Sep 05 '13 at 05:39
  • Try this: gpg --keyserver keyserver.ubuntu.com --recv 1E9377A2BA9EF27F – Frantique Sep 05 '13 at 10:16
  • The gpg key import has to be done without sudo! – Frantique Sep 05 '13 at 10:18
  • The same continued and Got this error on update Failed to fetch http://ppa.launchpad.net/launchpad.net/ppa/ubuntu/dists/lucid/main/binary-i386/Packages.gz 404 Not Found, I browsed through the link and also didn't found it – sai kiran grandhi Sep 06 '13 at 05:10
  • Did you issued sudo apt-get update after gpg import? – Frantique Sep 06 '13 at 07:52
  • the command,gpg --keyserver keyserver.ubuntu.com --recv 1E9377A2BA9EF27F which you have mentioned didn't work and after I run update which gave 404 error...... – sai kiran grandhi Sep 06 '13 at 10:18
  • I have update the question with the errors I got, can you please help me....... – sai kiran grandhi Sep 10 '13 at 12:46