ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

ubuntu添加源报错The following signatures couldn't be verified because the public key is not availabl

2021-11-17 14:36:00  阅读:228  来源: 互联网

标签:available signatures key root gpg apt 报错 aliyun com


本身是一个非常简单的问题,这里简单做个记录,容器里面一般会有安装一些软件调试的需求,换个源之后会出现导入gpg的错误。
这里从改源开始

root@machine-learn:/etc/apt# echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" > sources.list
root@machine-learn:/etc/apt#  apt update
Get:1 http://mirrors.aliyun.com bionic InRelease [242 kB]
Ign http://mirrors.aliyun.com bionic InRelease
Get:2 http://mirrors.aliyun.com bionic/main amd64 Packages [1344 kB]
Get:3 http://mirrors.aliyun.com bionic/restricted amd64 Packages [13.5 kB]
Get:4 http://mirrors.aliyun.com bionic/universe amd64 Packages [11.3 MB]
Get:5 http://mirrors.aliyun.com bionic/multiverse amd64 Packages [186 kB]                                                                                                                                                                  
Fetched 13.1 MB in 9s (1446 kB/s)                                                                                                                                                                                                          
Reading package lists... Done
Building dependency tree       
Reading state information... Done
118 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: GPG error: http://mirrors.aliyun.com bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32

# 报了个错误。开始导入key,key的这个值取决于上面的提示
root@machine-learn:/etc/apt# gpg --keyserver keyserver.ubuntu.com --recv 3B4FE6ACC0B21F32 
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key C0B21F32 from hkp server keyserver.ubuntu.com
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key C0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@machine-learn: /etc/apt# gpg --export --armor 3B4FE6ACC0B21F32 |apt-key add -
OK


# 接下来继续执行apt update,随后就可以下载安装工具了
root@machine-learn:/etc/apt# apt update

标签:available,signatures,key,root,gpg,apt,报错,aliyun,com
来源: https://www.cnblogs.com/FengGeBlog/p/15567119.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有