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

综合分类评论1,776字数 226阅读模式

在 Debian 和 Ubuntu 下运行 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

把 3B4FE6ACC0B21F32 替换为你出现问题的IDs。另外,如果有如下问题,是因为加入了 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/*}

文章末尾固定信息

继续阅读
 
admin
  • 本文由 admin 发表于 2017年11月7日
  • 除非特殊声明,本站文章许可协议为"署名-非商用-相同方式共享 4.0",转载请保留原链、作者等信息。
Debian 环境安装新版 nginx 容器化

Debian 环境安装新版 nginx

在 Debian 系统中,我们可以通过 apt-get 安装系统自带的 nginx,这样安装的 nginx 版本略旧。Nginx 官网提供了一些编辑绎好的 deb 安装包,我们只需更新安装源,就可以通...
如何在 Debian 中锁定软件包版本 开发者

如何在 Debian 中锁定软件包版本

在 Debian 或基于 Debian/Ubuntu 的 Linux 发行版系统中,有多种方法可以将软件包锁定在一个特定的版本。也就是说,可以将某个软件固定维护在指定版本,不让其随系统更新而更新。 (...
广告也精彩
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证