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!


  • try this: apt-get --fix-broken – Sunny Jul 1 '11 at 15:23
  • @Sunny : --fix-broken is to be used with one command, right? I used it as apt-get --fix-broken update, still firefox is not updated. – Priyank Bhatnagar Jul 1 '11 at 16:33
  • This occurs today, with Linux Mint 17.2 . – K7AAY Sep 24 '15 at 2:26

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.

  • How to know which ppa to add? Currently in my sources.list file there is no ppa. But in the directory sources.list.d there is mozillateam-firefox-stable-lucid.list which has ppa in it. – Priyank Bhatnagar Jul 1 '11 at 13:34
  • then just move this file out (so you have backup): mv mozillateam-firefox-stable-lucid.list ~, then add the repo again. (see the exact ppa name in that file). – Sunny Jul 1 '11 at 13:44
  • Please take a look at my edit2. – Priyank Bhatnagar Jul 1 '11 at 15:15
  • Thanks! With your method, I was able to update my system. – Priyank Bhatnagar Jul 1 '11 at 17:03
  • Fails in Linux Cinnamon Mint 17.2 64-bit with > Cannot add PPA: 'No JSON object could be decoded'. – K7AAY Sep 24 '15 at 1:00

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.

  • apt-key update does nothing. The second link that you gave, when I run wget, I get ERROR 503: Service Unavailable. and the last link that you gave, on wget I get 404 Not Found. – Priyank Bhatnagar Jul 1 '11 at 13:06
  • Please take a look at edit2. – Priyank Bhatnagar Jul 1 '11 at 15:16

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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