您的位置:首页 > 其它

apt-get: NO_PUBKEY / GPG error

2015-11-12 11:53 357 查看
When updating a Debian based system (such as Ubuntu), it may happenthat apt-get will display an error message about public keys orGPG. This is a new feature of apt-get that will guarantee theauthenticity of the apt servers. Those errors generally look likethis:

W: GPG error: ftp://ftp.debian.org/ testingRelease:

The following signatures couldn't be verified because the publickey is not available: NO_PUBKEY 9AA38DCD55BE302B

W: There is no public key available for the following keyIDs:

9AA38DCD55BE302B


This is easily fixable, despite what you may find on the rest ofthe internet. It's caused by a faulty public key; it's probablyjust outdated.

Fix it by entering these two commands, remember to replace the keysbelow (9AA38DCD55BE302B) with the key in your system's errormessage.

# gpg --keyserver pgpkeys.mit.edu --recv-key 9AA38DCD55BE302B

# gpg -a --export 9AA38DCD55BE302B | sudo apt-key add -
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: