所以我有这个问题:
# apt-get update Get:1 http://ftp.us.debian.org etch Release.gpg [1032B] Hit http://ftp.us.debian.org etch Release (...bunch more of this elided...) Hit http://ftp.us.debian.org etch/contrib Sources Fetched 68.8kB in 1s (37.4kB/s) Reading package lists... Done W: There is no public key available for the following key IDs: 9AA38DCD55BE302B W: GPG error: http://ftp.us.debian.org etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B W: You may want to run apt-get update to correct these problems
显然我不能运行apt-get update因为apt-get希望我运行apt-get update来解决这个问题,这是令人不快的。 我该如何纠正?
尝试这样做,并再次运行apt-get:
apt-key update
apt-key是一个用于pipe理安全apt的gpg密钥环的程序。 钥匙圈保存在/etc/apt/trusted.gpg文件中(不要与相关但不是很有趣的/etc/apt/trustdb.gpg混淆)。 apt-key可用于显示密钥环中的密钥,以及添加或删除密钥。
有关Debian wiki的更多信息: http : //wiki.debian.org/SecureApt
如果这不起作用,请尝试:
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B apt-key add /root/.gnupg/pubring.gpg apt-get update
或者先sudo apt-get install debian-archive-keyring 。
之后,你可以继续正常
为确保您下载的软件包的来源,APT将要validation发行文件的签名。 如果它无法validation,它会抱怨你看到的消息。 在这种情况下,您必须安装相应的GPG密钥,以便APT可以正确validation文件。 不幸的是,您不应该盲目地下载任何密钥,因为您只希望仅允许信息库所有者拥有的可信密钥。 因此,您必须以确保其来源的方式下载它,并简单地使用gpg --recv-key下载gpg --recv-key不能确保。
使用apt-key add <key-file>完成安装新密钥。 大多数非官方储存库为您提供网站上的密钥,并为您提供这样的说明(URL当然不同):
wget -O - http://ftp-master.debian.org/keys/archive-key-5.0.asc | sudo apt-key add -
在官方Debian镜像的情况下,您应该自动安装正确的密钥,它包含在软件包debian-archive-keyring并且其configuration会自动激活密钥。 所以确保你已经安装了它,并确保它是最新的:
apt-get install debian-archive-keyring
如果你不信任你的镜像,你也可以在安装了正确的密钥之后再安装它,我实际上给出了你需要的官方密钥的URL。
有关如何处理Debian存档密钥的更多信息,可以查看http://ftp-master.debian.org/keys.html 。
我在Juanty 9.04 64位上遇到同样的问题。 尝试了几个build议,但这个伎俩:
wget -O – http://ftp-master.debian.org/keys/archive-key-5.0.asc | sudo apt-key add –
该做的 :
sudo apt-get update
谢谢
Fanus
我有这个问题,由于透明代理给我一个老版本的GPG密钥,我解决了它通过使用wget强制代理获得一个新的版本,例如
wget --no-cache -O /tmp/Z http://security.debian.org/dists/lenny/updates/Release.gpg wget --no-cache -O /tmp/Z2 http://security.debian.org/dists/lenny/updates/Release
所以我希望在你的情况下,下面的命令可以解决它:
wget --no-cache -O /tmp/Z http://ftp.us.debian.org/dists/etch/Release.gpg wget --no-cache -O /tmp/Z2 http://ftp.us.debian.org/dists/etch/Release
很显然,我们到目前为止已经过了Etch,现在不再是这种情况了,但是我在这里logging下来,以便帮助别人。