4

When i run sudo apt-get update, i get the following error

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 9BDB3D89CE49EC21.

I tried searching for it, but wasn't able to find anything helpful. What is the reason for this, and how can i fix this?

Edit1: I am using Linux mint 9.

Edit2: On sudo add-apt-repository ppa:mozillateam/firefox-stable/ubuntu, I was getting gpgkeys: HTTP fetch error 7: couldn't connect to host, so i did according to this post. When I run sudo apt-get update, it gives no errors. But, firefox 5 is still not installed. In my update manager when I try to install, it says "Fix broken packages first". In Synaptic manager there is an option of "Fix broken Packages", but it does nothing. What is going wrong here?

Edit3: Update is used to resynchronize the package index files from their sources, and Upgrade is used to install latest versions. So, I was forgetting about upgrade!

Thanks!

3 Answers3

2

The most direct method is to use apt itself:

$ apt-key update


The Ubuntu Forums have a couple things to say about this using more roundabout methods, if apt doesn't do it properly.

ok. I figured it out.

do this:

wget http://packages.freecontrib.org/ubuntu/plf/12B83718.gpg

and then open up synaptic and go to settings>repos>authentication and "import file key" browse the key and click ok.

and then sudo aptitude update


And this:

sudo wget http://ftp-master.debian.org/ziyi_key_2006.asc -O - | sudo apt-key add -


This is the link to my Google search - there's quite a bit much there to put in a single response.

new123456
  • 4,833
2

Edit your /etc/apt/sources.list, and comment out the offending line (add "#" at the beginning of the line). The line you are looking for should have "ppa" in it. Save the file. Pls - note which ppa was mentioned there.

If in sources.list there is no ppa mentioned, check the files in /etc/apt/sources.list.d/ for a file which has "ppa" mentioned in there". Move this file to somewhere (so you have backup).

Then do:

sudo add-apt-repository ppa:any-ppa-that-I-need

This will add the ppa back to sources, but will fetch and install the pgp key as well.

Sunny
  • 951
1

Thanks to ChrisJean.com I fixed this entirely in about 10 minutes.

First, collect a list of the GPG errors, by
cd /etc/apt/sources/list/d
sudo apt-get update > listoferrors

Do sudo nano listoferrors and strip out everything but the 16 character hexadecimal strings, and a space between each, then add at the beginning
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys so the hex strings, with a space between each, follow that apt-key command.

Copy the entire string and paste it into a terminal window with Ctrl-Shift-V. You end up with something like
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0123456789ABCDEF FEDCBA9876543210 11A11B11C11D11E1

Run it. It goes out, retrieves the correct keys, and puts them in place.

Then, another sudo apt-get update runs without flaw.

Close and delete the listoferrors file.

K7AAY
  • 9,725