在使用apt-get update 更新时提示
W: GPG error: http://ftp.debian-unofficial.org etch Release: The following
signatures couldn't be verified because the public key is not available:
NO_PUBKEY D5642BC86823D007
W: You may want to run apt-get update to correct these problems
出现上叙问题是由于没有公钥,http://ftp.debian-unofficial.org 的签名无法进行验证!只要重新导入公钥即可!
gpg --keyserver subkeys.pgp.net --recv-keys D5642BC86823D007
gpg --export D5642BC86823D007 | apt-key add -
编写一个脚本处理此问题
#!/bin/sh
if [ !# -eq 0 ]
then
echo usage: $0 keys
exit 1
fi
gpg --keyserver subkeys.pgp.net --recv-keys $1
gpg --export $1| apt-key add -
本文介绍了解决在使用apt-get update时遇到的GPG错误问题的方法,即因缺少公钥导致的签名验证失败。通过导入指定公钥,可以顺利解决这一问题。
1369

被折叠的 条评论
为什么被折叠?



