首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >apt-get update遇到NO_PUBKEY

apt-get update遇到NO_PUBKEY

作者头像
runzhliu
发布2020-08-06 10:45:54
发布2020-08-06 10:45:54
1.8K0
举报
文章被收录于专栏:容器计算容器计算

这是因为给 Ubuntu 安装软件的时候需要做验证,当然了,这个并不是必须的,也就是你的容器里也可以装没有经过认证可能不安全的源中安装需要的软件,虽然不建议,但是有时候为了快速调试,比如在公司内部的源里安装软件,可以试一下。

如果遇到 NO_PUBKEY 的问题,如下:

代码语言:javascript
复制
root@spark-sparkoperator-58f598c98b-x7vjn:/etc/apt/trusted.gpg.d# apt-get update
Get:1 http://mirrors.tencent.com/ubuntu bionic InRelease [242 kB]
Err:1 http://mirrors.tencent.com/ubuntu bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
Reading package lists... Done
W: GPG error: http://mirrors.tencent.com/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://mirrors.tencent.com/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@spark-sparkoperator-58f598c98b-x7vjn:/etc/apt/trusted.gpg.d# apt-get install iputils-ping
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package iputils-ping

上面是我发现镜像里没有 ping 工具,所以需要装一个,但是遇到了 NO_PUBKEY 的问题,于是通过下面的命令可以成功安装,原理当然就是,没有做验证了。

代码语言:javascript
复制
apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update
apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true  install iputils-ping

搞清楚原理,其实这类问题是很容易解决的,类似的如 Centos,也是一个道理。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/06/03 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档