Centos 8 dnf yum - распространенные ошибки
Бывает, что возникают ошибки на ровном месте. К примеру сразу после установки чистой системы отказывается работать yum/dnf. Большинство ошибок лечатся банальным удалением кэша.

warning: /var/cache/dnf/AppStream-a520ed22b0a8a736/packages/gpm-libs-1.20.7-15.e                                         l8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS-8 - AppStream                            157 kB/s | 1.6 kB     00:00
CentOS-8 - Base                                 1.6 MB/s | 1.6 kB     00:00
The GPG keys listed for the "CentOS-8 - AppStream" repository are already instal                                         led but they are not correct for this package.
Check that the correct key URLs are configured for this repository.. Failing pac                                         kage is: gpm-libs-1.20.7-15.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for mc-4.8.19-9.el8.x86_64.rpm is not installed. Failing package is:                                          mc-1:4.8.19-9.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
The GPG keys listed for the "CentOS-8 - Base" repository are already installed b                                         ut they are not correct for this package.
Check that the correct key URLs are configured for this repository.. Failing pac                                         kage is: perl-Carp-1.42-396.el8.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-Errno-1.28-416.el8.x86_64.rpm is not installed. Failing pack                                         age is: perl-Errno-1.28-416.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-Exporter-5.72-396.el8.noarch.rpm is not installed. Failing p                                         ackage is: perl-Exporter-5.72-396.el8.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-File-Path-2.15-2.el8.noarch.rpm is not installed. Failing pa                                         ckage is: perl-File-Path-2.15-2.el8.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-File-Temp-0.230.600-1.el8.noarch.rpm is not installed. Faili                                         ng package is: perl-File-Temp-0.230.600-1.el8.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-IO-1.38-416.el8.x86_64.rpm is not installed. Failing package                                          is: perl-IO-1.38-416.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-PathTools-3.74-1.el8.x86_64.rpm is not installed. Failing pa                                         ckage is: perl-PathTools-3.74-1.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-Scalar-List-Utils-1.49-2.el8.x86_64.rpm is not installed. Fa                                         iling package is: perl-Scalar-List-Utils-3:1.49-2.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-Socket-2.027-3.el8.x86_64.rpm is not installed. Failing pack                                         age is: perl-Socket-4:2.027-3.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch.rpm is not installed                                         . Failing package is: perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-Unicode-Normalize-1.25-396.el8.x86_64.rpm is not installed.                                          Failing package is: perl-Unicode-Normalize-1.25-396.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-constant-1.33-396.el8.noarch.rpm is not installed. Failing p                                         ackage is: perl-constant-1.33-396.el8.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-interpreter-5.26.3-416.el8.x86_64.rpm is not installed. Fail                                         ing package is: perl-interpreter-4:5.26.3-416.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-libs-5.26.3-416.el8.x86_64.rpm is not installed. Failing pac                                         kage is: perl-libs-4:5.26.3-416.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-macros-5.26.3-416.el8.x86_64.rpm is not installed. Failing p                                         ackage is: perl-macros-4:5.26.3-416.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-parent-0.237-1.el8.noarch.rpm is not installed. Failing pack                                         age is: perl-parent-1:0.237-1.el8.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-threads-2.21-2.el8.x86_64.rpm is not installed. Failing pack                                         age is: perl-threads-1:2.21-2.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for perl-threads-shared-1.58-2.el8.x86_64.rpm is not installed. Faili                                         ng package is: perl-threads-shared-1.58-2.el8.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
The downloaded packages were saved in cache until the next successful transactio                                         n.
You can remove cached packages by executing 'dnf clean packages'.
Error: GPG check FAILED
Failed to download metadata for repo 'AppStream'
Error: Failed to download metadata for repo 'AppStream'
Extra Packages for Enterprise Linux Modular 8 - x86_64     0.0  B/s |   0  B     00:00
Failed to download metadata for repo 'epel-modular'
Error: Failed to download metadata for repo 'epel-modular'

Первым делом проверяется сеть, если доступ к зеркалам есть, то идем дальше.
Второе, что проверяем - время на сервере. Если время указано неверное, то могут не работать сертификаты в dnf и прочих сетевых вещах.
При неправильном времени - ставим chrony и синхронизируемся.

​Обычно, достаточно очистить кэш:
# dnf clean all
# rm -rf /var/cache/dnf/*
# dnf upgrade
Этого бывает недостаточно. Можно еще переустановить репозитории:
Идем сюда: http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/
Берем нужный rpm centos-repo
# curl http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-repos-8.1-1.1911.0.9.el8.x86_64.rpm -o centos-repos-8.1-1.1911.0.9.el8.x86_64.rpm
Удаляем настройки репозиториев:
# rpm -rf /etc/yum.repos.d/*
Устанавливаем заново
# rpm -i --force centos-repos-8.1-1.1911.0.9.el8.x86_64.rpm
Дальше стандартно:
# dnf clean all
# rm -rf /var/cache/dnf/*
# dnf upgrade
Если используется прокси, то нужно еще проверить dnf.conf
# cat /etc/dnf/dnf.conf
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True

http://[proxy-host].[domain].com:[port]
 
Ви маєте увійти під своїм обліковим записом

loading