报错:RPM-GPG-KEY

2023年11月9日 | 分类: 【技术】

【问题】

当通过 yum 升级 CentOS系统时,报错:

warning: /var/cache/yum/x86_64/7/city-fan.org/packages/sendmail-8.17.2-4.1.cf.rh                                                                                                                                                             el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 98661eb8: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org

The GPG keys listed for the "city-fan.org repository for Red Hat Enterprise Linu                                                                                                                                                             x (and clones) 7 (x86_64)" repository are already installed but they are not cor                                                                                                                                                             rect for this package.
Check that the correct key URLs are configured for this repository.

 Failing package is: sendmail-8.17.2-4.1.cf.rhel7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org

【方案】

rpm --import /etc/pki/rpm-gpg/RPM*

参考:https://blog.51cto.com/u_15476443/4890592