Small Tip: How to fix “There are no public key available for the following key IDs” Error in Debian
Few days ago I’ve started migration of some of my non-critical servers to Debian Etch (from Sarge). Just after first apt-get update && apt-get dist-upgrade, when apt has been upgraded, I noticed really strange (as for me) error: when I’ve tried to do “apt-get update” it worked fine, but there was annoying message like following:
1 2 3 4 5 6 7 8 | # apt-get update ...... Fetched 5562B in 13s (421B/s) Reading package lists... Done W: There are no public key available for the following key IDs: A70DAF536070D3A1 W: You may want to run apt-get update to correct these problems # |
UPDATE: Thanks to Kurt Fitzner we know, that:
There is already a mechanism to do this automatically:
1 $ apt-key updateThis will obtain the necesary keys and import them. No need to go through gpg directly.
After not so long research I figured out, that this problem was caused by change of gpg key used by ftpmaster on Debian official repository servers. Google gave me some information and I found some fix which works fine for me:
1 2 3 4 5 6 | # gpg --keyserver wwwkeys.eu.pgp.net --recv-keys XXXXXXXXXXXXXXXX ... # apt-key add /root/.gnupg/pubring.gpg ... # apt-get update ... |
Where XXXXXXXXXXXXXXXX is your missing key (e.g A70DAF536070D3A1).
That’s it! Happy using Debian GNU/Linux!
Related posts:
15 Responses to this entry
To keep the apt-key list from getting too clogged-up with keys if you have lots in the root gpg keyring, you might want to use something like:
gpg –keyserver foo –recv-keys
followed by:
gpg –export –armor A70DAF536070D3A1 | apt-key add -
This will just add the one key specified to the apt-key keyring
2Legooolas: Great thanks for very useful comment!
Thank you!
This really saved me some time.
[...] Original post by unknown [...]
Great tip!
Thanx!
great tips thanx ..
had problems for weeks with that ..
thnx !
There is already a mechanism to do this automatically:
$ apt-key update
This will obtain the necesary keys and import them. No need to go through gpg directly.
Tried apt-key update to no avail. The gpg instructions worked a treat though. Thanks for the tip!
Found this post:
http://www.debian-administration.org/users/dkg/weblog/11
which covers the problem in detail.
# apt-get install debian-archive-keyring
is apparently a better way to solve this without adding unverified keys to apt-secure if apt-key update doesn’t work for you.
[...] I found the solution at http://blog.kovyrin.net/2006/11/28/debian-problem-apt-get-update/ [...]
Even “apt-get install debian-archive-keyring”
did not work for me.
The problem was, that I had really old
expired keys on my system that didn’t get updated
by the install of debian-archive-keyring.
The complete solution was:
apt-key list
apt-key del 1DB114E0
apt-key del 4F368D5D
apt-key del 2D230C5F
ie. run “apt-key del” for all keys marked expired in
“apt-key list” output
Then finally:
dpkg –purge debian-archive-keyring
apt-get install debian-archive-keyring
[...] (<http://blog.kovyrin.net/2006/11/28/debian-problem-apt-get-update/>
Still others reported having to pass something like, [...]
More notes on this:
http://serfgeek.blogspot.com/index.html#116007821818690201
sudo apt-get update -o Acquire::http::No-Cache=True
>> This should work
Excellent tip! the apt-ket update didnt work, but your instructions for using gpg worked great for me