apt-get update出现NO_PUBKEY问题解决
apt-get update
报错
root@2870e7cf8e74:/usr/tools# apt-get update
Ign:1 https://mirrors.aliyun.com/ubuntu trusty InRelease
Get:2 https://mirrors.aliyun.com/ubuntu trusty Release [58.5 kB]
Get:3 https://mirrors.aliyun.com/ubuntu trusty Release.gpg [933 B]
Ign:3 https://mirrors.aliyun.com/ubuntu trusty Release.gpg
Reading package lists... Done
W: GPG error: https://mirrors.aliyun.com/ubuntu trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'https://mirrors.aliyun.com/ubuntu trusty Release' 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.
解决办法:
将不可用的pubkey加到ubuntu服务器,从上面可以看到如下pubkey
NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
使用以上pubkey拼接如下命令
gpg --keyserver keyserver.ubuntu.com --recv 40976EAF437D05B5gpg --export --armor 40976EAF437D05B5 | apt-key add -gpg --keyserver keyserver.ubuntu.com --recv 3B4FE6ACC0B21F32gpg --export --armor 3B4FE6ACC0B21F32 | apt-key add -
我的环境因为是docker中的Python环境 ,默认用户是root,所以不用加sudo,如果非root用户可能会需要切换用户获取权限。则命令如下:
sudo gpg --keyserver keyserver.ubuntu.com --recv 40976EAF437D05B5
sudo gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -
sudo gpg --keyserver keyserver.ubuntu.com --recv 3B4FE6ACC0B21F32
sudo gpg --export --armor 3B4FE6ACC0B21F32 | sudo apt-key add -
执行完以上命令后可以正常执行apt-update
命令
root@2870e7cf8e74:/usr/tools# apt-get update
Ign:1 https://mirrors.aliyun.com/ubuntu trusty InRelease
Get:2 https://mirrors.aliyun.com/ubuntu trusty Release [58.5 kB]
Get:3 https://mirrors.aliyun.com/ubuntu trusty Release.gpg [933 B]
Get:4 https://mirrors.aliyun.com/ubuntu trusty/main amd64 Packages [1350 kB]
Get:5 https://mirrors.aliyun.com/ubuntu trusty/multiverse amd64 Packages [132 kB]
Get:6 https://mirrors.aliyun.com/ubuntu trusty/restricted amd64 Packages [13.0 kB]
Get:7 https://mirrors.aliyun.com/ubuntu trusty/universe amd64 Packages [5859 kB]
Fetched 7414 kB in 22s (343 kB/s)
Reading package lists... Done
apt-get update出现NO_PUBKEY问题解决相关推荐
- apt 的 update 和 upgrade 命令的区别是什么?
如果想让你的 Ubuntu 或者 Debian 系统保持更新,要用 sudo apt update 和 sudo apt upgrade 命令组合. 一些以前的教程也会提到 sudo apt-get ...
- Ubuntu apt install / update错误前因后果: 连接失败 [IP: 91.189.91.* 80]
同时更新Ubuntu系统和升级Python3.10时,期间命令删除"sudo apt remove Python3*"包,以为由此引发一系列问题,且最终的系统崩溃无法登陆.启动系统 ...
- Detailed errors from the package manager follow: apt transaction returned result exit-failed问题解决
参考链接 问题描述: 当我在Ubuntu系统下安装搜狗输入法时,报获取软件源错误的信息. 解决方案: 更新软件源. 步骤如下: 1. 点击Software & Updates 2. 在Down ...
- Deepin15.7 Android8.1 编译 以及问题解决
前几天装了deepin15.7美滋滋,然后开始折腾编译.LOS15.1(android8.1),在此记录遇到的问题 1.大天朝下载源码是个问题,换个hosts即可,这里我用的是 https://git ...
- Cubietruck开发板折腾009:升级apt后的故障解决
前面我们遇到了Cubietruck开发板折腾008:apt-get update出现警告问题解决,我们通过apt-get install -f apt将apt进行了升级(之前百度了发现说apt与当前版 ...
- 鸟哥的Linux私房菜(服务器)- 簡易 APT/YUM 伺服器設定
簡易 APT/YUM 伺服器設定 最近更新日期:2004/06/23 用不慣 Tarball 安裝套件卻又擔心 RPM 的屬性相依問題嗎?如果有一種套件管理工具可以克服 RPM 屬性相依的方法該有多 ...
- linux 设置更新源为cd,技术|如何修复 apt-get update 无法添加新的 CD-ROM 的错误
这些天我正在体验Elementary OS Freya,在这期间,我遇到了一个非常常见的更新错误:Failed to fetch cdrom Please use apt-cdrom to make ...
- Ubuntu 22.04 LTS apt-get update 报 Key is stored in legacy trusted.gpg keyring 警告解决方案
背景介绍 在 Ubuntu 22.04 LTS 下更新源 apt-get update 遇到了Key is stored in legacy trusted.gpg keyring (/etc/apt ...
- NVIDIA平台xavier upgrade update更新完后驱动丢失问题
1. 背景 如果xavier平台修改了相应的底层驱动后: 如果联网升级软件[例: apt upgrade/update], 系统会重新升级系统,包括kernel 镜像.dtb等: 所以会导致之前加载的 ...
- failed to read artifact descriptor for *** 问题解决心得
前提:更换maven版本,今天更换了maven的版本,从3.1.1更换为3.3.9,本来好好地项目更换完版本报了136个错,开头的几个错都是failed to read artifact descri ...
最新文章
- mac要装anaconda吗_Anaconda安装教程|Windows,Linux ,Mac OS
- find命令过滤 no such_运维老手常用的linux命令操作
- 让.NET程序会说话
- 为什么说人工智能是一个大谎言
- 求逆序对(信息学奥赛一本通-T1311)
- utf8转gb2312 c语言,UTF-8, Unicode, GB2312格式串转换之C语言版
- mac显示网速_Mac系统怎么查看测试网速
- python大写金额算法
- 福利!H3CNE认证网络工程师GB0-191 考试试题库超详细解析-02。持续更新~~
- How to Backdoor Federated Learning
- 201809-1 卖菜(100分)
- TCP的核心系列 — SACK和DSACK的实现(六)
- 如何完全清除linux内核,清除旧的Linux内核
- input框动态模糊查询,能输入,能选择
- 环境变量之java环境变量
- uni-app中,文字超出隐藏并显示省略号(实现展开、收起全文)
- 浏览器Goole Chrome调试工具
- 微信公众号支付详细步骤(整理)
- operator*() 和 operator-()
- linux 编译QT atom,QT5 编译使用TagLib