分享

使用apt-get update升级debian系统时报错

 rookie 2013-01-28
错误一:
W: GPG error: http://ftp.us. squeeze Release: The following signatures
were invalid: BADSIG AED4B06F473041FA Debian Archive Automatic Signing Key (6.0
/squeeze) <ftpmaster@>
sudo rm /var/lib/apt/lists/* -vf

错误二:
目前使用apt-get update升级debian系统时报错如下:
# apt-get update
获取:1 http://mirrors.163.com stable Release.gpg [1672B]
命中 http://mirrors.163.com stable Release
错误 http://mirrors.163.com stable Release
  
获取:2 http://mirrors.163.com stable Release [104kB]
忽略 http://mirrors.163.com stable Release
忽略 http://mirrors.163.com stable/main Packages/DiffIndex
忽略 http://mirrors.163.com stable/main Sources/DiffIndex
命中 http://mirrors.163.com stable/main Packages
命中 http://mirrors.163.com stable/main Sources
下载 105kB,耗时 0s (130kB/s)
正在读取软件包列表... 完成
W: GPG error: http://mirrors.163.com stable Release: 由于没有公钥,下列签名无法进行验证: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
W: 您可能需要运行 apt-get update 来解决这些问题



解决方法如下:
使用gpg --keyserver 获取公钥
# gpg --keyserver pgpkeys.mit.edu --recv-key AED4B06F473041FA
gpg: requesting key 473041FA from hkp server pgpkeys.mit.edu
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 473041FA: public key "Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
# gpg -a --export AED4B06F473041FA |  apt-key add -
OK


# gpg --keyserver pgpkeys.mit.edu --recv-key 64481591B98321F9
gpg: requesting key B98321F9 from hkp server pgpkeys.mit.edu
gpg: key B98321F9: public key "Squeeze Stable Release Key <debian-release@lists.>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
# gpg -a --export 64481591B98321F9 |  apt-key add -
OK


再次执行apt-get update成功
# apt-get update
获取:1 http://mirrors.163.com stable Release.gpg [1672B]
获取:2 http://mirrors.163.com stable Release [104kB]
忽略 http://mirrors.163.com stable/main Packages/DiffIndex
忽略 http://mirrors.163.com stable/main Sources/DiffIndex
命中 http://mirrors.163.com stable/main Packages
命中 http://mirrors.163.com stable/main Sources
下载 104kB,耗时 1s (82.4kB/s)

正在读取软件包列表... 完成

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多