Small Tip: How to fix “There are no public key available for the following key IDs” Error in Debian

Posted by Oleksiy Kovyrin under Admin-tips

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 update

This 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:

  1. Unofficial Debian GNU/Linux Repositories Overview
  2. A Concise apt-get / dpkg primer for new Debian users
  3. How to Install Oracle Database XE on Debian Sarge

15 Responses to this entry

Legooolas says:

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 :)

Kurt Fitzner says:

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.

Peter says:

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

Alucard says:

sudo apt-get update -o Acquire::http::No-Cache=True

>> This should work

Sean says:

Excellent tip! the apt-ket update didnt work, but your instructions for using gpg worked great for me :)