GPG Error - Public Key Not Available
In 64-bit Ubuntu 9.04 (Jaunty Jackalope), I received this message after clicking the Check button in (System > Administration >) Update Manager:
W: GPG error: http://deb.opera.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F9A2F76A9D1A0061The recommended solution was to type this into Terminal:
gpg --keyserver keyserver.ubuntu.com --recv [last 8 characters of code]; gpg --export --armor [last 8 characters of code] | sudo apt-key addIn my case, as shown above, those last eight characters were 9D1A0061, so that's what I entered into the command just given. This gave me a message, "gpg: requesting key 9D1A0061 from hkp server keyserver.ubuntu.com." But then we went no further: after several minutes, I got this message:
gpg: keyserver timed out gpg: keyserver receive failed: keyserver error [sudo] password for ray: gpg: WARNING: nothing exportedand then it just seemed to hang there. So I tried a different approach. Although "apt-key update" was supposed to work, it didn't; it gave me this:
gpg: can't access `/etc/apt/trustdb.gpg': Permission denied gpg: fatal: can't init trustdb: trust database error secmem usage: 0/0 bytes in 0/0 blocks of pool 0/32768Continuing, then, with what looked like an earlier approach at that same webpage, I tried this:
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys F9A2F76A9D1A0061 sudo apt-key add /root/.gnupg/pubring.gpg apt-get update. . . using, in other words, the full key from the error message in the first of these three command line entries. This approach appeared to be working better: the first line got me an indication that a key had been imported. But the second line ("apt-key add ...") resulted in an error: "gpg: can't open `/root/.gnupg/pubring.gpg': No such file or directory." I was still getting the error when I clicked "Check" in Update Manager. A comment added to the instructions cited above suggested using this:
sudo apt-get install debian-archive-keyringbut I still got the same error in Update Manager. Another comment said this would work:
apt-key list apt-key del [last 8 digits of key shown as expired in the apt-key list output] [repeat this del command for each such expired key] dpkg –purge debian-archive-keyring apt-get install debian-archive-keyringI got tired of typing "sudo" in front of each line, so I just typed "sudo -i" and then started down this list. I only got to the first command: it appeared that I didn't have any expired keys. So this wasn't the fix for me. Still another suggestion from the comments in that same webpage:
sudo apt-get update -o Acquire::http::No-Cache=TrueThis ran, and then advised me to run apt-get update. I ran that twice, but still got that same message about the Opera key, and the same error message persisted when I ran Update Manager. From a Debian page that I located by doing a search for the specific NO_PUBKEY error message (above), I got this:
wget -O - http://deb.opera.com/archive.key | sudo apt-key add -and that seemed to solve the problem.