APT仓库密钥过期修复 The following signatures were invalid

APT仓库密钥过期修复 The following signatures were invalid

Debian/Ubuntu系统使用使用sudo apt install 安装软件时报错:

xxxx:/mnt/var$ sudo apt update
Hit:1 https://fast-mirror.isrc.ac.cn/revyos/revyos-base sid InRelease
Get:2 https://fast-mirror.isrc.ac.cn/revyos/revyos-kernels revyos-kernels InRelease [5,806 B]
Get:3 https://fast-mirror.isrc.ac.cn/revyos/revyos-addons revyos-addons InRelease [9,442 B]
Get:4 https://fast-mirror.isrc.ac.cn/revyos/revyos-gles-21 revyos-gles-21 InRelease [9,446 B]
Err:1 https://fast-mirror.isrc.ac.cn/revyos/revyos-base sid InRelease
  The following signatures were invalid: EXPKEYSIG xxxxxxxxxxxx Han Gao <gaohan@iscas.ac.cn>
Err:2 https://fast-mirror.isrc.ac.cn/revyos/revyos-kernels revyos-kernels InRelease
  The following signatures were invalid: EXPKEYSIG xxxxxxxxxxxx Han Gao <gaohan@iscas.ac.cn>
Err:3 https://fast-mirror.isrc.ac.cn/revyos/revyos-addons revyos-addons InRelease
  The following signatures were invalid: EXPKEYSIG xxxxxxxxxxxx Han Gao <gaohan@iscas.ac.cn>
Err:4 https://fast-mirror.isrc.ac.cn/revyos/revyos-gles-21 revyos-gles-21 InRelease
  The following signatures were invalid: EXPKEYSIG xxxxxxxxxxxx Han Gao <gaohan@iscas.ac.cn>
Fetched 24.7 kB in 3s (8,655 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
42 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://fast-mirror.isrc.ac.cn/revyos/revyos-base sid InRelease: The following signatures were invalid: EXPKEYSIG 2FB3A9E77911527E Han Gao <gaohan@iscas.ac.cn>
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://fast-mirror.isrc.ac.cn/revyos/revyos-kernels revyos-kernels InRelease: The following signatures were invalid: EXPKEYSIG 2FB3A9E77911527E Han Gao <gaohan@iscas.ac.cn>
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://fast-mirror.isrc.ac.cn/revyos/revyos-addons revyos-addons InRelease: The following signatures were invalid: EXPKEYSIG 2FB3A9E77911527E Han Gao <gaohan@iscas.ac.cn>
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://fast-mirror.isrc.ac.cn/revyos/revyos-gles-21 revyos-gles-21 InRelease: The following signatures were invalid: EXPKEYSIG 2FB3A9E77911527E Han Gao <gaohan@iscas.ac.cn>
W: Failed to fetch https://mirror.iscas.ac.cn/revyos/revyos-base/dists/sid/InRelease  The following signatures were invalid: EXPKEYSIG 2FB3A9E77911527E Han Gao <gaohan@iscas.ac.cn>
W: Failed to fetch https://mirror.iscas.ac.cn/revyos/revyos-kernels/dists/revyos-kernels/InRelease  The following signatures were invalid: EXPKEYSIG 2FB3A9E77911527E Han Gao <gaohan@iscas.ac.cn>
W: Failed to fetch https://mirror.iscas.ac.cn/revyos/revyos-addons/dists/revyos-addons/InRelease  The following signatures were invalid: EXPKEYSIG 2FB3A9E77911527E Han Gao <gaohan@iscas.ac.cn>
W: Failed to fetch https://mirror.iscas.ac.cn/revyos/revyos-gles-21/dists/revyos-gles-21/InRelease  The following signatures were invalid: EXPKEYSIG 2FB3A9E77911527E Han Gao <gaohan@iscas.ac.cn>
W: Some index files failed to download. They have been ignored, or old ones used instead.

问题核心是多个仓库的GPG密钥已过期(EXPKEYSIG),导致APT无法验证仓库签名。以下是完整解决方案:

导入新密钥

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys xxxxxxxxxxxx # 将 xxxxxxxxxxxx 替换为你的id
sudo apt update # 刷新APT缓存
posted @ 2025-06-25 23:41  tlocd  阅读(218)  评论(0)    收藏  举报