[转载]修复ppa的GPG缺少公钥问题

本文介绍了解决Debian系统中通过apt-get更新时遇到的公钥验证失败的问题。通过从指定服务器导入缺失的公钥,并重新运行apt-get update命令,成功解决了更新过程中出现的验证错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考网页

背景说明

我的是deepin2015.1操作系统,基于debian sid,原生态不支持ppa,百度自行添加的支持ppa命令。现在加入了部分ppa,无法验证公钥。

问题表现

加入Nodejs的ppa源,使用如下命令更新

sudo apt-get update

弹出如下问题

W: GPG 错误:http://ppa.launchpad.net/chris-lea/node.js/ubuntu lucid Release: 由于没有公钥,无法验证下列签名: NO_PUBKEY B9316A7BC7917B12
W: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu lucid Release' is not signed.
W: 以下 ID 的密钥没有可用的公钥:
B9316A7BC7917B12  

问题分析

需要下载公钥哦,第一眼想法是百度求解,百度不行就谷歌。经测试可解了。

解决方案

参考网页

原文说明:

Execute the following commands in terminal

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>

where <PUBKEY> is your missing public key for repository, e.g. 8BAF9A6F.

Then update

sudo apt-get update

最终解决方案

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B9316A7BC7917B12
sudo apt-get update

转载于:https://my.oschina.net/bubifengyun/blog/615352

正在读取软件包列表... 完成 W: GPG 错误:http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu noble InRelease: 下列签名无效: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info@osrfoundation.org> E: 仓库 “http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu noble InRelease” 没有数字签名。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: http://mirrors.aliyun.com/docker-ce/linux/ubuntu/dists/noble/InRelease: 密钥存储在过时的 trusted.gpg 密钥环中(/etc/apt/trusted.gpg),请参见 apt-key(8) 的 DEPRECATION 一节以了解详情。 N: 鉴于仓库 'http://mirrors.aliyun.com/docker-ce/linux/ubuntu noble InRelease' 不支持 'i386' 体系结构,跳过配置文件 'stable/binary-i386/Packages' 的获取。 W: GPG 错误:https://apollo-pkg-beta.cdn.bcebos.com/apollo/core noble InRelease: 下列签名无效: EXPKEYSIG A769FBD86CEFB5EA apollo <apollo@baidu.com> E: 仓库 “https://apollo-pkg-beta.cdn.bcebos.com/apollo/core noble InRelease” 没有数字签名。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: https://apollo-pkg-beta.cdn.bcebos.com/apollo/core/dists/bionic/InRelease: 密钥存储在过时的 trusted.gpg 密钥环中(/etc/apt/trusted.gpg),请参见 apt-key(8) 的 DEPRECATION 一节以了解详情。 W: GPG 错误:https://apollo-pkg-beta.cdn.bcebos.com/apollo/core bionic InRelease: 下列签名无效: EXPKEYSIG A769FBD86CEFB5EA apollo <apollo@baidu.com> E: 仓库 “https://apollo-pkg-beta.cdn.bcebos.com/apollo/core bionic InRelease” 没有数字签名。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://packages.ros.org/ros/ubuntu noble Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: http://packages.osrfoundation.org/gazebo/ubuntu-stable/dists/noble/InRelease: 密钥存储在过时的 trusted.gpg 密钥环中(/etc/apt/trusted.gpg),请参见 apt-key(8) 的 DEPRECATION 一节以了解详情。 W: https://download.docker.com/linux/ubuntu/dists/noble/InRelease: 密钥存储在过时的 trusted.gpg 密钥环中(/etc/apt/trusted.gpg),请参见 apt-key(8) 的 DEPRECATION 一节以了解详情。 N: 鉴于仓库 'https://download.docker.com/linux/ubuntu noble InRelease' 不支持 'i386' 体系结构,跳过配置文件 'stable/binary-i386/Packages' 的获取。 E: 仓库 “https://ppa.launchpadcontent.net/lutris-team/lutris/ubuntu noble Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “https://ppa.launchpadcontent.net/ubuntu-wine/ppa/ubuntu noble Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
07-10
(base) lxy@lxy-Legion-Y9000P-IAH7H:~$ sudo add-apt-repository ppa:apt-fast/stable sudo apt update sudo apt install apt-fast [sudo] lxy 的密码: 源: 'deb https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu/ jammy main' 描述: This PPA contains tested (stable) builds of apt-fast. Project: https://github.com/ilikenwf/apt-fast 更多信息:https://launchpad.net/~apt-fast/+archive/ubuntu/stable 正在添加源。 按 [ENTER] 继续,或按 Ctrl-c 取消。 Adding deb entry to /etc/apt/sources.list.d/apt-fast-ubuntu-stable-jammy.list Adding disabled deb-src entry to /etc/apt/sources.list.d/apt-fast-ubuntu-stable-jammy.list Adding key to /etc/apt/trusted.gpg.d/apt-fast-ubuntu-stable.gpg with fingerprint BC5934FD3DEBD4DAEA544F791E2824A7F22B44BD 命中:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease 获取:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease [128 kB] 获取:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease [127 kB] 获取:4 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B] 获取:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease [129 kB] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 DEP-11 Metadata [114 kB] 错误:4 https://dl.google.com/linux/chrome/deb stable InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 获取:8 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/restricted amd64 DEP-11 Metadata [212 B] 获取:9 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [359 kB] 获取:10 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B] 获取:11 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports/main amd64 DEP-11 Metadata [7,064 B] 获取:12 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports/restricted amd64 DEP-11 Metadata [212 B] 获取:13 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [24.2 kB] 获取:14 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports/multiverse amd64 DEP-11 Metadata [212 B] 获取:15 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security/main amd64 DEP-11 Metadata [54.6 kB] 获取:16 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security/restricted amd64 DEP-11 Metadata [208 B] 获取:17 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security/universe amd64 DEP-11 Metadata [125 kB] 获取:18 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security/multiverse amd64 DEP-11 Metadata [208 B] 命中:6 https://packages.microsoft.com/repos/code stable InRelease 获取:19 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy InRelease [18.3 kB] 忽略:20 https://deepin-wine.i-m.dev InRelease 获取:21 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy/main amd64 Packages [536 B] 命中:22 https://deepin-wine.i-m.dev Release 获取:23 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy/main i386 Packages [536 B] 获取:24 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy/main Translation-en [272 B] 忽略:25 https://deepin-wine.i-m.dev Release.gpg 已下载 1,090 kB,耗时 3秒 (364 kB/s) 正在读取软件包列表... 完成 W: 校验数字签名时出错。此仓库未被更新,所以仍然使用此前的索引文件。GPG 错误:https://dl.google.com/linux/chrome/deb stable InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 W: 无法下载 https://dl.google.com/linux/chrome/deb/dists/stable/InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 W: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。 命中:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease 命中:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease 命中:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease 命中:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease 获取:6 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B] 错误:6 https://dl.google.com/linux/chrome/deb stable InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 命中:5 https://packages.microsoft.com/repos/code stable InRelease 命中:7 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy InRelease 忽略:8 https://deepin-wine.i-m.dev InRelease 命中:9 https://deepin-wine.i-m.dev Release 忽略:10 https://deepin-wine.i-m.dev Release.gpg 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 有 275 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。 W: 校验数字签名时出错。此仓库未被更新,所以仍然使用此前的索引文件。GPG 错误:https://dl.google.com/linux/chrome/deb stable InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 W: 无法下载 https://dl.google.com/linux/chrome/deb/dists/stable/InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 32EE5355A6BC6E42 W: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: apport-symptoms gdb libbabeltrace1 libboost-regex1.74.0 libc6-dbg libdebuginfod-common libdebuginfod1 libipt2 libsource-highlight-common libsource-highlight4v5 nvidia-firmware-535-535.183.01 python3-systemd 使用'sudo apt autoremove'来卸载它(它们)。 将会同时安装下列软件: aria2 libaria2-0 libc-ares2 libssh2-1 建议安装: aptitude zsh fish 下列【新】软件包将被安装: apt-fast aria2 libaria2-0 libc-ares2 libssh2-1 升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 275 个软件包未被升级。 需要下载 1,661 kB 的归档。 解压缩后会消耗 5,948 kB 的额外空间。 您希望继续执行吗? [Y/n] y 获取:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/main amd64 libc-ares2 amd64 1.18.1-1ubuntu0.22.04.3 [45.1 kB] 获取:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 libssh2-1 amd64 1.10.0-3 [109 kB] 获取:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 libaria2-0 amd64 1.36.0-1 [1,086 kB] 获取:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 aria2 amd64 1.36.0-1 [381 kB] 获取:5 https://ppa.launchpadcontent.net/apt-fast/stable/ubuntu jammy/main amd64 apt-fast all 1.11.1-1~ubuntu22.04.1 [38.5 kB] 已下载 1,661 kB,耗时 2秒 (1,075 kB/s) 正在预设定软件包 ... 正在选中未选择的软件包 libc-ares2:amd64。 (正在读取数据库 ... 系统当前共安装有 240215 个文件和目录。) 准备解压 .../libc-ares2_1.18.1-1ubuntu0.22.04.3_amd64.deb ... 正在解压 libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ... 正在选中未选择的软件包 libssh2-1:amd64。 准备解压 .../libssh2-1_1.10.0-3_amd64.deb ... 正在解压 libssh2-1:amd64 (1.10.0-3) ... 正在选中未选择的软件包 libaria2-0:amd64。 准备解压 .../libaria2-0_1.36.0-1_amd64.deb ... 正在解压 libaria2-0:amd64 (1.36.0-1) ... 正在选中未选择的软件包 aria2。 准备解压 .../aria2_1.36.0-1_amd64.deb ... 正在解压 aria2 (1.36.0-1) ... 正在选中未选择的软件包 apt-fast。 准备解压 .../apt-fast_1.11.1-1~ubuntu22.04.1_all.deb ... 正在解压 apt-fast (1.11.1-1~ubuntu22.04.1) ... 正在设置 libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ... 正在设置 libssh2-1:amd64 (1.10.0-3) ... 正在设置 libaria2-0:amd64 (1.36.0-1) ... 正在设置 aria2 (1.36.0-1) ... 正在设置 apt-fast (1.11.1-1~ubuntu22.04.1) ... 正在处理用于 man-db (2.10.2-1) 的触发器 ... 正在处理用于 libc-bin (2.35-0ubuntu3.10) 的触发器 ... (base) lxy@lxy-Legion-Y9000P-IAH7H:~$ sudo apt-fast install ttf-mscorefonts-installer 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 ttf-mscorefonts-installer 已经是最新版 (3.8ubuntu2)。 下列软件包是自动安装的并且现在不需要了: apport-symptoms gdb libbabeltrace1 libboost-regex1.74.0 libc6-dbg libdebuginfod-common libdebuginfod1 libipt2 libsource-highlight-common libsource-highlight4v5 nvidia-firmware-535-535.183.01 python3-systemd 使用'sudo apt autoremove'来卸载它(它们)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 275 个软件包未被升级。
07-08
root@ros-virtual-machine:/home/ros# sudo add-apt-repository "deb http://ppa.launchpad.net/nemh/systemback > /ubuntu xenial main" 命中:1 http://mirrors.ustc.edu.cn/ubuntu bionic InRelease 获取:2 http://mirrors.ustc.edu.cn/ubuntu bionic-updates InRelease [102 kB] 获取:3 http://mirrors.ustc.edu.cn/ubuntu bionic-backports InRelease [102 kB] 获取:4 http://mirrors.ustc.edu.cn/ubuntu bionic-security InRelease [102 kB] 获取:6 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/main amd64 DEP-11 Metadata [297 kB] 获取:7 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/restricted amd64 DEP-11 Metadata [212 B] 获取:5 https://packages.microsoft.com/repos/code stable InRelease [3,590 B] 获取:8 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [303 kB] 命中:9 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease 获取:10 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B] 获取:11 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/main amd64 DEP-11 Metadata [8,108 B] 获取:12 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/restricted amd64 DEP-11 Metadata [216 B] 获取:13 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [10.0 kB] 获取:14 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/multiverse amd64 DEP-11 Metadata [216 B] 获取:15 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main amd64 DEP-11 Metadata [77.0 kB] 命中:16 http://packages.osrfoundation.org/gazebo/ubuntu-stable bionic InRelease 获取:17 http://mirrors.ustc.edu.cn/ubuntu bionic-security/restricted amd64 DEP-11 Metadata [212 B] 获取:18 http://mirrors.ustc.edu.cn/ubuntu bionic-security/universe amd64 DEP-11 Metadata [61.9 kB] 忽略:19 http://ppa.launchpad.net/nemh/systemback /ubuntu InRelease 获取:20 http://mirrors.ustc.edu.cn/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B] 获取:21 https://packages.microsoft.com/repos/code stable/main arm64 Packages [20.3 kB] 获取:22 https://packages.microsoft.com/repos/code stable/main amd64 Packages [20.2 kB] 命中:23 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic InRelease 错误:24 http://ppa.launchpad.net/nemh/systemback /ubuntu Release 404 Not Found [IP: 185.125.190.80 80] 获取:25 https://packages.microsoft.com/repos/code stable/main armhf Packages [20.4 kB] 错误:23 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic InRelease 下列签名无效: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info@osrfoundation.org> 正在读取软件包列表... 完成 E: 仓库 “http://ppa.launchpad.net/nemh/systemback /ubuntu Release” 没有 Release 文件。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: 校验数字签名时出错。此仓库未被更新,所以仍然使用此前的索引文件。GPG 错误:http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic InRelease: 下列签名无效: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info@osrfoundation.org>
07-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值