There are no public key available for the following key IDs:解决方法

Thenynoc的VPS由于停止洛杉矶机房VPS服务并转移已有洛杉矶VPS至纽约机房,而且不能退款,所以分配下新的IP直接重装为Debian~瞎折腾着玩。

thenynoc:/var/lib/apt/lists# apt-get update
Get:1 http://security.debian.org stable/updates Release.gpg [835B]
……省略N多没用的……
Hit http://security.debian.org stable/updates/main Packages
Fetched 41.6kB in 0s (56.5kB/s)
Reading package lists... Done
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: GPG error: http://security.debian.org stable/updates 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

本来是想更新一下系统的,出错了。

解决方法:

首先执行:gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B   //最后为你出错是的key ids

返回如下信息,说明执行成功。

gpg: requesting key 55BE302B from hkp server wwwkeys.eu.pgp.net
gpg: key 55BE302B: public key "Debian Archive Automatic Signing Key (5.0/lenny)

<ftpmaster@debian.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
再执行:gpg --armor --export 9AA38DCD55BE302B  | apt-key add -
返回:OK

再执行apt-get update:成功~
thenynoc:/var/lib/apt/lists# apt-get update
Get:1 http://security.debian.org stable/updates Release.gpg [835B]
……省略N多没用的……
Hit ftp://debian.mirror.rafal.ca stable/main Sources
Fetched 835B in 0s (1080B/s)
Reading package lists... Done
thenynoc:/var/lib/apt/lists#

PS:如果上面的方法不行,可以执行下面的命令试试:

apt-get install debian-keyring
gpg --keyring /usr/share/keyrings/debian-keyring.gpg -a --export 07DC563D1F41B907 |apt-key add -

3 Responses to There are no public key available for the following key IDs:解决方法

发表回复

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理