This morning I tried to update my Ubuntu machine and got this error massage ‘Requires installation of unstrusted packages’ and couldn’t figure out why. I later found out that I was missing some GPG keys. If you find yourself in this same situation and need help with it, I’m going show you how to quickly resolve it in Ubuntu Lucid or Maverick.
The error screen below is what you’ll get when you try to update your system via Update Manager.
To fix it, go to Applications –> Accessories’ –> Terminal. and run the command below:
sudo apt-get update
Then take notes of all the numbers (keys) after ‘NO_PUBKEY’. I have underlined my missing keys in the image above.
To install the missing public keys, run the command below for each missing key. Replace XXXXXX with the key shown
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com XXXXXXXXX
After that, type the command below to update your package repository with the missing key:
sudo apt-get update
Next, try updating your system again, and this time it should work.
Thanks for reading and please come back soon.

after I type in the
sudo apt-key adv –recv-key –keyserver keyserver.ubuntu.com XXXXXXXXX
command i get the following:
Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /etc/apt/secring.gpg –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –recv-key –keyserver keyserver.ubuntu.com 61E091672E206FF0
gpg: requesting key 2E206FF0 from hkp server keyserver.ubuntu.com
?: keyserver.ubuntu.com: Connection timed out
gpgkeys: HTTP fetch error 7: couldn’t connect: Connection timed out
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
x2
hey thankyou for that worked perfectly
Thanks!!! this solved it
thanks buddy. it worked :)
Excellent work, thanks very much
Thanks a lot buddy
Thanks a lot bro… :)
Thanks for your helpful post – In my case after running apt-get update, I didn’t get any NO_PUBKEY entries.. So I tried to update again and it worked… Not sure why it failed in the first place but, you helped me solve it.. Thanks a lot.
thanks man….it workd…
u rck
Thanks a lot. it worked fine. Didn’t even have to fix the missing keys. Just typing the sudo apt-get update command worked for me.
yeah the commands worked successful
I can’t seem to download the Keys, I get the following messages in the terminal when
When I go through all the steps I get the following at the end and I have tried this 6 times in a row with no joy….. Below is what I am getting when I try to get the keys
Hit http://ppa.launchpad.net maverick Release
Ign http://ppa.launchpad.net maverick Release
Ign http://ppa.launchpad.net maverick/main Sources/DiffIndex
Ign http://ppa.launchpad.net maverick/main amd64 Packages/DiffIndex
Ign http://ppa.launchpad.net maverick/main Sources/DiffIndex
Ign http://ppa.launchpad.net maverick/main amd64 Packages/DiffIndex
Hit http://ppa.launchpad.net maverick/main Sources
Hit http://ppa.launchpad.net maverick/main amd64 Packages
Hit http://ppa.launchpad.net maverick/main Sources
Hit http://ppa.launchpad.net maverick/main amd64 Packages
Fetched 633B in 9s (64B/s)
Reading package lists… Done
W: GPG error: http://ppa.launchpad.net maverick Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 531EE72F4C9D234C
W: GPG error: http://ppa.launchpad.net maverick Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 35DA01C261E46227
maheanuu@maheanuu:~$
Any help would be greatly appreciated, I am not only a newbie, but am over the end of the world and do not have anyone on this island that even has the foggiest notion about Linux or Ubuntu
great topic!
In my case, I did not see any NO_PUBKEY at apt-get output, but when I tried the Update Manager again, it starts working!
May be just running the sudo apt-get update itself helped the update manager. Thanks.
thanks alot :) worked like a charm :D
Thank you!
Just running the first command
sudo apt-get update
solved the problem.
P.S. : It didn’t display any PUB-KEY too.
Thanks, but typing only sudo apt-get update resolved my problem :)
Thanks a lot! It solved the problem – I am new to Ubuntu….
nice share…it’s works. thx
Go to System>Administrator>Software Sources, open the second tab “Other Software” and click the http://archive.canonical.com/ubuntu partner (Source Code)
hai
i’m in this situation, n i has to follow that command, but i have this :
sandy_riyadi@RSK-LNX-UB1:~$ sudo apt-key adv –recv-key –keyserver keyserver.ubuntu.com 2E206FF0
Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /etc/apt/secring.gpg –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –recv-key –keyserver keyserver.ubuntu.com 2E206FF0
gpg: requesting key 2E206FF0 from hkp server keyserver.ubuntu.com
?: keyserver.ubuntu.com: Connection refused
gpgkeys: HTTP fetch error 7: couldn’t connect: Connection refused
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
sandy_riyadi@RSK-LNX-UB1:~$
how to fix that problem ???
thanks a lot its working for me..
thanks it workssssssss……………..
Thanks…I didn’t even change the codes.
Just terminal command and update.
Works just fine!
thx it works now
What caused this problem?
Thanks a lot buddy, it worked for me.
Ubuntu support groups and fans ROCK !
Thanx a million
great. thanks.
thanks a lot, this is beautifully works for me.
this worked. thanks!
Also works with Natty Narwhal (11.04)
Thanks much!
Thanx man
It really worked.. Thanks!!!
Thx Thx Thx a lot.
If you can’t use apt-key then another option is to just do it via command line as mentioned in this post: http://ubuntuforums.org/showthread.php?t=1610171
So here’s how I resolved it:
1. open a terminal
2. sudo apt-get update
3. sudo apt-get upgrade
Then say “Y” when asked to install without verification
Bravo!!! worked like a charm, thank you so much
Thanks, fixed my issue!
Appreciated
Simply PERFECT…………Thankx
Thanks….Its working fine.
Worked fine on Ubuntu 11.04 , thank you!
I dont know why, but after that error I performed sudo update-manager
That functioned without errors.
Btw I could not find any errors concerning any kay. but the error mag
was the same.
Thank you, solved a nagging problem
Thank you. Worked perfectly without a hitch.
****worked perfectly on lubuntu 11.10…the problem was with one of the medibuntu packages — public key.
many thanks…:)
Thanks! ..fixed my update problem with a CRAN mirror for R packages
Thanks man! Always wondered how to fix that instead of always doing upgrades from the command line. Was getting old doing it that way.
thank you very much for your supporting.
thank you my friend …
just the first terminal command did the work :)
thanks
Many Thanks!
I used:
sudo apt-get update | grep “GPG Error”
to easier identify the key-less package. :)
Thanks for the very good info – precise and to the point!
For my 12.04 the first step ( sudo apt-get update ) was sufficient. – But thanks anyway!
Worked like a charm. Thanks for posting!
Very good. Tks!