如何在更新程序中修复 GPG

Tra*_*dge 34 apt gnupg

我以前问过这个问题,但它被关闭为“重复”。我可以向您保证,我的方案是原创的,因为它不涉及第三方 PPA。我有系统更新的 GPG 问题。它说没有可用的公钥,并且我也被警告说我的更新信息已过时。这是终端文本:

W: A error occurred during the signature verification.
The repository is not updated and the previous index files will be used. GPG error:http://extras.ubuntu.com quantal Release: 
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192

W: GPG error: http:// archive.canonical.com quantal Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http:// us.archive.ubuntu.com quantal Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http:// us.archive.ubuntu.com quantal-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http:// us.archive.ubuntu.com quantal-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http:// us.archive.ubuntu.com quantal-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: Failed to fetch http:// extras.ubuntu.com/ubuntu/dists/quantal/Release

W: Some index files failed to download. They have been ignored, or old ones used instead.
Run Code Online (Sandbox Code Playgroud)

我在 url 中放置了空格,因为每个问题不允许新用户超过两个超链接。

请不要只是将其作为重复项关闭。它不是指第三方 PPA,而是指 Canonical 发布的标准更新包。

小智 81

在终端中运行这些命令:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
Run Code Online (Sandbox Code Playgroud)

这将从 Ubuntu GPG 密钥服务器下载丢失的 GPG 密钥(如原始错误消息中所述)。

  • 您还可以使用单个命令添加多个密钥:`apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 40976EAF437D05B5` (4认同)