错误:在 Fedora 中使用 dnf 升级系统时 GPG 检查失败

错误:在 Fedora 中使用 dnf 升级系统时 GPG 检查失败

今天早些时候,当我尝试升级 Fedora 26 服务器时,下载软件包后收到以下错误消息:

warning: /var/cache/dnf/forensics-5e8452ee3a114fbe/packages/protobuf-c-1.3.0-1.fc26.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 87e360b8: NOKEY
Importing GPG key 0x87E360B8:
Userid     : "CERT Forensics Operations and Investivations Team <[email protected]>"
 Fingerprint: 26A0 829D 5C01 FC51 C304 9037 E97F 3E0A 87E3 60B8
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-cert-forensics-2018-04-07
Is this ok [y/N]: n
Didn't install any keys
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

所以我放弃了升级,并尝试dnf clean packages重新下载,但仍然遇到同样的错误。

看来protobuf打包没有有效的签名,因此dnf无法继续,这是正确的吗?

答案1

使用此命令可以解决此问题:dnf update --nogpgcheck

答案2

但是......你说“不”:

Is this ok [y/N]: n

...当要求安装密钥时!

尝试用 yes ( y) 代替!

答案3

我收到以下消息

Package code-1.40.1-1573664332.el7.x86_64.rpm is not signed
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

所以code包裹没有签名。

让我们看看哪个 repo 提供了它:

dnf provides code | grep "Repo" | sort | uniq

Repo        : code
Repo        : @System

我可以通过禁用code存储库来继续:

sudo dnf update --refresh --verbose --disablerepo code

相关内容