在对一台Debian服务器执行更新时,发生如下错误:
# apt-get update Hit http://security.debian.org wheezy/updates Release.gpg Hit http://security.debian.org wheezy/updates Release Hit http://security.debian.org wheezy/updates/main i386 Packages Hit http://security.debian.org wheezy/updates/contrib i386 Packages Hit http://security.debian.org wheezy/updates/non-free i386 Packages Hit http://security.debian.org wheezy/updates/contrib Translation-en Hit http://security.debian.org wheezy/updates/main Translation-en Hit http://security.debian.org wheezy/updates/non-free Translation-en Hit http://ftp.debian.org wheezy Release.gpg Hit http://ftp.debian.org wheezy Release Hit http://ftp.debian.org wheezy/main i386 Packages Hit http://ftp.debian.org wheezy/contrib i386 Packages Hit http://ftp.debian.org wheezy/non-free i386 Packages Hit http://ftp.debian.org wheezy/contrib Translation-en Hit http://ftp.debian.org wheezy/main Translation-en Hit http://ftp.debian.org wheezy/non-free Translation-en Reading package lists... Done W: There is no public key available for the following key IDs: 9D6D8F6BC857C906 W: There is no public key available for the following key IDs: 7638D0442B90D010
在网上搜索了一下,找到相关文档:
http://www.linuxquestions.org/questions/debian-26/there-is-no-public-key…
其中介绍了二种方法,一种方法如下:
# gpg --recv-keys 4D270D06F42584E6 # gpg --export 4D270D06F42584E6 | apt-key add -
另一种方法似乎更为简单:
# apt-get install debian-keyring debian-archive-keyring # apt-key update
尝试了第二种方法,成功解决了public key的问题。