Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried to install some third party packages by following instructions on this URL.

After doing the following, I started to get the error "Unable to locate the package"

root@ubuntu:/# cd /root/
root@ubuntu:~# wget http://www.webmin.com/jcameron-key.asc
root@ubuntu:~# apt-key add jcameron-key.asc

After googling I found if I deleted the sources.list file it will be recreated, which I did. But whenever I try to install anything it gives the error "Unable to locate package". I tried generating the source.list file and pasting the content it seems to work but, when I go the following.

sudo apt-get update

it gives me this error.

W: GPG error: http://ubuntu-cloud.archive.canonical.com precise-updates/grizzly Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5EDB1B62EC4926EA

How can I solve this, I have been googling for days now, can't just re-install my server. Thanks.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You really don't need to reinstall your server because of this. This is just a problem with handling the keys that sign the repositories' contents. You need to read the apt-key(8) and gpg manpages.

Try this procedure:

  • look for the public key hinted in the error message.

    # gpg --recv-keys 5EDB1B62EC4926EA
    gpg: requesting key EC4926EA from hkp server pool.sks-keyservers.net
    gpg: key EC4926EA: public key "Canonical Cloud Archive Signing Key <ftpmaster@canonical.com>" imported
    gpg: Total number processed: 1
    gpg:               imported: 1  (RSA: 1)
    
  • once the key has been downloaded, export it to a file.

    # gpg --export EC4926EA > canonical.asc
    
  • now you can add it to the APT keyring.

    # apt-key add canonical.asc
    
  • update the indices by issuing:

    # aptitude update
    
  • now there should be no problem listing packages from that repository, provided you have it properly configured in your sources.list.

    # aptitude search $package
    
share|improve this answer
    
Thank you very much for the response. I get this result. gpg: WARNING: unsafe ownership on configuration file `/home/himsadmin/.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 –  JRulz Oct 10 '13 at 10:55
    
That error message means exactly that: review the ownership and permissions of your gpg.conf, it should belong to you, your group and don't be group or others readable or writable. –  dawud Oct 10 '13 at 10:58
    
Thank you very much, everything works perfectly now. Your answers were specific, clear and timely. –  JRulz Oct 11 '13 at 5:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.