无法运行 apt update:至少遇到一个无效签名

无法运行 apt update:至少遇到一个无效签名

我的 Linux Mint 20 安装突然停止更新。更新管理器显示“您的 APT 配置已损坏”。运行 apt update 会产生以下消息:

Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]      
Get:2 http://ppa.launchpad.net/kdenlive/kdenlive-stable/ubuntu focal InRelease [18,1 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]                
Err:2 http://ppa.launchpad.net/kdenlive/kdenlive-stable/ubuntu focal InRelease 
  At least one invalid signature was encountered.
Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
  At least one invalid signature was encountered.
Err:3 http://archive.ubuntu.com/ubuntu focal InRelease
  At least one invalid signature was encountered.
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Err:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  At least one invalid signature was encountered.
Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Err:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  At least one invalid signature was encountered.
Ign:6 http://packages.linuxmint.com ulyana InRelease                           
Get:7 http://packages.linuxmint.com ulyana Release [24,1 kB]                   
Get:8 http://packages.linuxmint.com ulyana Release.gpg [833 B]                 
Ign:8 http://packages.linuxmint.com ulyana Release.gpg   
Get:9 http://archive.canonical.com/ubuntu focal InRelease [12,1 kB]            
Err:9 http://archive.canonical.com/ubuntu focal InRelease                      
  At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/kdenlive/kdenlive-stable/ubuntu focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ppa.launchpad.net/kdenlive/kdenlive-stable/ubuntu focal 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://security.ubuntu.com/ubuntu focal-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.ubuntu.com/ubuntu focal-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.
W: GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu focal 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 focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu focal-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 focal-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports 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://packages.linuxmint.com ulyana Release: At least one invalid signature was encountered.
E: The repository 'http://packages.linuxmint.com ulyana Release' 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.canonical.com/ubuntu focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.canonical.com/ubuntu focal 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.

我尝试运行 apt clean,但这并没有解决问题。此外,apt-key list 给出了以下奇怪的消息:

base64: invalid input

请帮忙。

答案1

找到了适合我的情况的解决方案!

apt-get update在许多存储库中写道“至少遇到一个无效签名”。没有关于丢失 GPG 密钥的消息。与您的输出完全一样,但其他存储库也是如此。

我跑步apt-key list并且在某处注意到了base64: invalid input一条消息。

这是我输出的中间部分

/etc/apt/trusted.gpg.d/nordvpn-keyring.gpg
------------------------------------------
pub   rsa4096 2018-08-02 [SC]
      BC54 80EF EC5C 081C E5BC  FBE2 6B21 9E53 5C96 4CA1
uid           [ unknown] NordVPN <[email protected]>
sub   rsa4096 2018-08-02 [S]

base64: invalid input      <--- THIS IS THE PROBLEM 

答案2

如果apt-get updateapt-get autocleansudo apt-get clean不起作用,并且您没有使用它,您可以尝试通过修改(使用 nano、vim 或其他)文件 来手动删除导致问题的源/etc/apt/sources.list。否则,您可以尝试使用 手动添加所需源的缺失/损坏的 GPG 密钥wget -qO - <link_to_source_key> | sudo apt-key add -

相关内容