Mitter G Yanik 2024-08-23 16:48 采纳率: 0%
浏览 83

为什么我的ubuntu22.04.4中的APT包管理突然无法验证GPG密钥?

输出日志:

Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease
  Unknown error executing apt-key
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Err:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
  Unknown error executing apt-key
Get:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Err:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease
  Unknown error executing apt-key
Reading package lists... Done
W: GPG error: http://archive.ubuntu.com/ubuntu jammy InRelease: Unknown error executing apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' 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.
W: GPG error: http://archive.ubuntu.com/ubuntu jammy-updates InRelease: Unknown error executing apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' 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.
W: GPG error: http://archive.ubuntu.com/ubuntu jammy-security InRelease: Unknown error executing apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-security InRelease' 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.

问一下这是出现什么情况了吗?之前还正常的获取到包列表的

  • 写回答

2条回答 默认 最新

  • 吃不了席 2024-08-23 17:01
    关注

    以下回复参考:皆我百晓生券券喵儿等免费微信小程序作答:

    这个问题可能是由于GPG密钥验证失败导致的。你可以尝试以下方法来解决这个问题:

    1. 更新系统并安装必要的软件包:
    sudo apt update
    sudo apt install --reinstall ca-certificates
    
    1. 清除APT缓存并重新尝试更新:
    sudo apt clean
    sudo apt update
    
    1. 如果问题仍然存在,尝试手动导入缺失的GPG密钥。首先,找到缺失的密钥ID,然后使用apt-key adv命令导入密钥:
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY_ID>
    

    <KEY_ID>替换为实际的密钥ID。你可以在错误日志中找到这些信息。

    1. 最后,再次尝试更新软件包列表:
    sudo apt update
    

    如果以上方法都无法解决问题,建议检查网络连接或更换其他软件源。

    评论

报告相同问题?

问题事件

  • 修改了问题 8月23日
  • 创建了问题 8月23日