“为“atomicrocketturtle.com”存储库列出的 GPG 密钥已经安装,但对于此软件包不正确。”

Rus*_*ack 3 yum rpm centos

在 CentOS 6 上运行时:

yum update
Run Code Online (Sandbox Code Playgroud)

我接受它提供的交易摘要,然后立即收到以下信息:

Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID 4520afa9: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt

The GPG keys listed for the "CentOS / Red Hat Enterprise Linux 6 - atomicrocketturtle.com" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

当我运行这个:

rpm -q --queryformat "%{SUMMARY}\n" gpg-pubkey
Run Code Online (Sandbox Code Playgroud)

我得到这个回应:

gpg(CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>)
gpg(EPEL (6) <epel@fedoraproject.org>)
gpg(Atomic Rocket Turtle <admin@atomicrocketturtle.com>)
gpg(New Relic <support@newrelic.com>)
Run Code Online (Sandbox Code Playgroud)

Kri*_*fer 6

对我来说,查看较新的 atomic-release 包 rpm 似乎添加了一个新的 GPG 密钥并正在使用中,因此如果您有一段时间没有升级,您可能会遇到此问题。

要修复,您需要手动下载并导入密钥并更新 repo 配置:

wget https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt
mv RPM-GPG-KEY.atomicorp.txt /etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
Run Code Online (Sandbox Code Playgroud)

更改 /etc/yum.repos.d/atomic.repo。线路:

gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
Run Code Online (Sandbox Code Playgroud)

需要一个额外的条目并成为:

gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
        file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
Run Code Online (Sandbox Code Playgroud)