apt-get出现“no public key available…”的解决方法

linux_vmvps众所周知,Linux虽然比Windows的安全系数要高,但是经常更新还是个好习惯(至少近期就爆出了不少关于SSL的安全漏洞值得大家重视!),但是在Ubuntu和Debian下运行apt-get update刷新更新源的时候却经常遇到“There is no public key available for the following key IDs”的问题,具体表现为以下错误提示:

W:There is no public key available for the following key IDs: 3B4FE6ACC0B21F32,
W:There is no public key available for the following key IDs: 3B4FE6ACC0B21F32,

解决方法如下,

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32

额外的,如果有如下问题,是因为加入了natty-backports源,删掉即可

W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-backports/main/source/Sources  404  Not Found [IP: 91.189.91.13 80],
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-backports/restricted/source/Sources  404  Not Found [IP: 91.189.91.13 80],
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-backports/universe/source/Sources  404  Not Found [IP: 91.189.91.13 80],
W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/natty-backports/multiverse/source/Sources  404  Not Found [IP: 91.189.91.13 80],

运行如下命令:

sudo sed -i '/natty\-backports/d' /etc/apt/sources.list{,.d/*}

猜你 喜欢

关于作者: 微魔

小微魔,大智慧!

多条评论

  1. Pingback: My Blog
  2. Pingback: 89生活

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注