linux下apt-get出现“no public key available…”解决方法
kevin.Zhu 发布于:2014-1-10 15:40 分类:Linux 有 17 人浏览,获得评论 0 条
众所周知,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/*}