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

简介: 在 Debian 和 Ubuntu 下运行 apt-get update 刷新更新源的时候,经常遇到 “There is no public key available for the following key IDs” 的问题,具体表现为以下错误提示: W:There is no publi.

在 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/*}

原文发布时间:2017-11-07
本文来自云栖社区合作伙伴“ Debian社区”,了解相关信息可以关注“ Debian社区”。
相关文章
|
Ubuntu
ubuntu 替换清华源遇到的问题-不能更新,无法拉取 https 源解决
ubuntu 替换清华源遇到的问题-不能更新,无法拉取 https 源解决
4640 0
ubuntu 替换清华源遇到的问题-不能更新,无法拉取 https 源解决
|
Ubuntu 开发工具
Ubuntu更换阿里云软件源
Ubuntu更换阿里云软件源
140637 0
|
Linux 容器 Docker
Debian配置系统中文语言及环境
Debian配置系统中文语言及环境
11291 1
|
机器学习/深度学习 算法 PyTorch
挑战Transformer的新架构Mamba解析以及Pytorch复现
今天我们来详细研究这篇论文“Mamba:具有选择性状态空间的线性时间序列建模”
1977 1
|
Ubuntu Linux 时序数据库
|
Prometheus Kubernetes Cloud Native
让 K8S 在 GFW 内愉快的航行
随着 *.azk8s.cn 限制了外部IP访问,国内的K8S环境变得越加的槽糕了,今天我们就来梳理一下目前国内可用的最新方案。
19579 0
|
11月前
|
网络协议 Ubuntu Linux
gpg从公钥服务器接收失败(gpg: keyserver receive failed: Server indicated a failure)
通过上述步骤,大多数情况下应该能够解决GPG从公钥服务器接收失败的问题。如果问题依旧存在,可能需要进一步调查与公钥服务器相关的更深层次的技术问题,或者考虑在相关社区论坛寻求帮助。
2348 1
修改apt-get源为国内镜像源
修改apt-get源为国内镜像源
5115 0
|
12月前
|
Linux Go C语言
用 Cython 包装静态库和动态库
用 Cython 包装静态库和动态库
179 0
|
Ubuntu 安全 网络协议