ubuntu添加源报错The following signatures couldn't be verified because the public key is not availabl
2021/11/18 7:13:09
本文主要是介绍ubuntu添加源报错The following signatures couldn't be verified because the public key is not availabl,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
本身是一个非常简单的问题,这里简单做个记录,容器里面一般会有安装一些软件调试的需求,换个源之后会出现导入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
这篇关于ubuntu添加源报错The following signatures couldn't be verified because the public key is not availabl的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2025-01-09CMS内容管理系统是什么?如何选择适合你的平台?
- 2025-01-08CCPM如何缩短项目周期并降低风险?
- 2025-01-08Omnivore 替代品 Readeck 安装与使用教程
- 2025-01-07Cursor 收费太贵?3分钟教你接入超低价 DeepSeek-V3,代码质量逼近 Claude 3.5
- 2025-01-06PingCAP 连续两年入选 Gartner 云数据库管理系统魔力象限“荣誉提及”
- 2025-01-05Easysearch 可搜索快照功能,看这篇就够了
- 2025-01-04BOT+EPC模式在基础设施项目中的应用与优势
- 2025-01-03用LangChain构建会检索和搜索的智能聊天机器人指南
- 2025-01-03图像文字理解,OCR、大模型还是多模态模型?PalliGema2在QLoRA技术上的微调与应用
- 2025-01-03混合搜索:用LanceDB实现语义和关键词结合的搜索技术(应用于实际项目)