[root@workstation ~]# rpm -e --allmatches gpg-pubkey
[root@workstation ~]# rpm -q gpg-pubkey
package gpg-pubkey is not installed
如果YUM 的源gpgcheck=true,这个时候再去安装包,就会出现问题:
[root@workstation ~]# yum install gc
Last metadata expiration check: 0:16:14 ago on Wed 28 Oct 2020 10:49:54 PM CST.
Package gc-7.6.4-3.el8.i686 is already installed.
Dependencies resolved.
===========================================================================================================================================================================
Package Architecture Version Repository Size
===========================================================================================================================================================================
Installing:
gc x86_64 7.6.4-3.el8 rhel-8.2-for-x86_64-appstream-rpms 109 k
Transaction Summary
===========================================================================================================================================================================
Install 1 Package
Total download size: 109 k
Installed size: 221 k
Is this ok [y/N]: y
Downloading Packages:
gc-7.6.4-3.el8.x86_64.rpm 3.0 MB/s | 109 kB 00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.8 MB/s | 109 kB 00:00
warning: /var/cache/dnf/rhel-8.2-for-x86_64-appstream-rpms-6dada6c3b9c28d72/packages/gc-7.6.4-3.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Public key for gc-7.6.4-3.el8.x86_64.rpm is not installed
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: GPG check FAILED