You may encounter the error message “Error: GPG check FAILED” when installing Zabbix on RHEL-based Linux distributions like CentOS, AlmaLinux, Rocky Linux, and Oracle Linux. The specific error is ascshown below:
Zabbix Official Repository non-supported - x86_64 3.0 MB/s | 3.1 kB 00:00
GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-08EFA7DD (0x08EFA7DD) is already installed
The GPG keys listed for the "Zabbix Official Repository non-supported - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.. Failing package is: fping-5.1-1.el8.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-08EFA7DD
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
The solution to this is ensuring Zabbix GPG key is imported into the system.
sudo rpm --import https://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
For Debian-based Linux distributions, use:
# Using curl
curl -fsSL https://repo.zabbix.com/zabbix-official-repo.key| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/zabbix.gpg
# Using wget
wget -qO- https://repo.zabbix.com/zabbix-official-repo.key | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/zabbix.gpg
Then update cache
# Debian based systems
sudo apt update
# RHEL based systems
sudo yum clean all
sudo yum makecache -y
Then proceed with the installation of the application. With these few steps, you should resolve GPG key issue and proceed with your application installation.