由于 GPG 检查失败,无法使用 dnf 进行更新

由于 GPG 检查失败,无法使用 dnf 进行更新

自上周以来,我无法更新任何内容。如果我尝试sudo dnf update,该过程会正常启动,但随后我会收到以下错误:

error: Verifying a signature using certificate D8BAD4DE7EE17AF52A834B2D0BB75829C2D4E821 (Brave Software <[email protected]>):
  Key A8580BDC82D3DC6C invalid: key is not alive
      because: The subkey is not live
      because: Expired on 2023-05-06T16:53:34Z

这重复了几次,最终出现以下错误:

Check that the correct key URLs are configured for this repository.. Failing package is: brave-browser-1.51.118-1.x86_64
 GPG Keys are configured as: 
Public key for brave-keyring-1.11-1.noarch.rpm is not trusted. Failing package is: brave-keyring-1.11-1.noarch
 GPG Keys are configured as: 
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: GPG check FAILED

其余内容均未更新。我甚至尝试按照建议删除缓存文件,但什么也没删除。

有什么想法可能造成这种情况以及如何解决?

我正在运行 Fedora 38。

答案1

它是最近一期Brave 浏览器及其过期密钥。

您可以尝试完全卸载该软件包并删除旧的密钥文件:

  • 使用以下方式查找密钥 IDrpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'
  • 用 删除sudo rpm -e gpg-pubkey-[keyId]

然后重新安装使用新密钥:

sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc

sudo dnf install brave-browser

答案2

您可以重新导入 fedora gpg 密钥:

curl https://fedoraproject.org/fedora.gpg | sudo gpg --import

相关内容