apt-get update 升级debian系统报错

目前使用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@debian.org>" 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.debian.org>" 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)

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


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值