8

I have upgraded a Centos7 server to Centos8 and then to Almalinux 8.8. If I run dnf update I get an error for any package. I have removed yum so I am using dnf. I have tried dnf clean all but the problem arises again when I do a dnf update. Here is the last part of my update log. I get the same error on every single package I am trying to update!

Public key for libstdc++-8.5.0-18.el8.alma.x86_64.rpm is not installed. Failing package is: libstdc++-8.5.0-18.el8.alma.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
Public key for ncurses-6.1-9.20180224.el8_8.1.x86_64.rpm is not installed. Failing package is: ncurses-6.1-9.20180224.el8_8.1.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
Public key for ncurses-base-6.1-9.20180224.el8_8.1.noarch.rpm is not installed. Failing package is: ncurses-base-6.1-9.20180224.el8_8.1.noarch
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
Public key for ncurses-libs-6.1-9.20180224.el8_8.1.x86_64.rpm is not installed. Failing package is: ncurses-libs-6.1-9.20180224.el8_8.1.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
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 

I have also tried this:

$ rpm --import "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux"
$ dnf clean packages

I am not sure if this is related because I am trying to install leapp-upgrade but get this error

Error: 
 Problem: conflicting requests
  - package leapp-upgrade-el8toel9-0.18.0-1.el8.noarch requires leapp-repository-dependencies = 9, but none of the providers can be installed
  - package leapp-upgrade-el8toel9-0.18.0-1.el8_8.2.alma.noarch requires leapp-repository-dependencies = 9, but none of the providers can be installed
  - package leapp-upgrade-el8toel9-deps-0.18.0-1.el8.noarch requires systemd-container, but none of the providers can be installed
  - package leapp-upgrade-el8toel9-deps-0.18.0-1.el8_8.2.alma.noarch requires systemd-container, but none of the providers can be installed
  - package systemd-container-239-74.el8_8.2.i686 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.7.x86_64
  - package systemd-container-239-74.el8_8.2.x86_64 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.7.x86_64
  - package systemd-container-239-74.el8_8.3.i686 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.7.x86_64
  - package systemd-container-239-74.el8_8.3.x86_64 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.7.x86_64
  - package systemd-container-239-74.el8_8.5.i686 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.7.x86_64
  - package systemd-container-239-74.el8_8.5.x86_64 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.7.x86_64
  - package systemd-container-239-74.el8_8.i686 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.7.x86_64
  - package systemd-container-239-74.el8_8.x86_64 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.7.x86_64
  - package systemd-python-219-78.el7_9.7.x86_64 requires systemd = 219-78.el7_9.7, but none of the providers can be installed
  - package leapp-upgrade-el7toel8-0.14.0-100.202109271224Z.b7ebfca.master.el7.elevate.noarch requires leapp-repository-dependencies = 6, but none of the providers can be installed
  - package leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.1.noarch requires leapp-repository-dependencies = 6, but none of the providers can be installed
  - package leapp-upgrade-el7toel8-1:0.16.0-6.el7.elevate.16.noarch requires leapp-repository-dependencies = 6, but none of the providers can be installed
  - package leapp-upgrade-el7toel8-1:0.16.0-6.el7.elevate.17.noarch requires leapp-repository-dependencies = 6, but none of the providers can be installed
  - package leapp-upgrade-el7toel8-1:0.16.0-6.el7.elevate.8.noarch requires leapp-repository-dependencies = 6, but none of the providers can be installed
  - package leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.noarch requires leapp-repository-dependencies = 6, but none of the providers can be installed
  - problem with installed package systemd-python-219-78.el7_9.7.x86_64
  - nothing provides python-requests needed by leapp-upgrade-el7toel8-deps-0.14.0-100.202109271224Z.b7ebfca.master.el7.elevate.noarch
  - nothing provides python-requests needed by leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.1.noarch
  - nothing provides python-requests needed by leapp-upgrade-el7toel8-deps-1:0.16.0-6.el7.elevate.16.noarch
  - nothing provides python-requests needed by leapp-upgrade-el7toel8-deps-1:0.16.0-6.el7.elevate.17.noarch
  - nothing provides python-requests needed by leapp-upgrade-el7toel8-deps-1:0.16.0-6.el7.elevate.8.noarch
  - nothing provides python-requests needed by leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.noarch
Nasir Riley
  • 2,300
Asle
  • 193

5 Answers5

17

It may be that your keys are outdated. They are part of the almalinux-release package, so run dnf upgrade almalinux-release first. After that the other packages should validate again.

9

For me, running sudo dnf upgrade almalinux-release still failed the same way:

$ sudo dnf upgrade almalinux-release
Last metadata expiration check: 1:48:55 ago on Tue 28 May 2024 08:39:46 PM PDT.
Dependencies resolved.
=========================================================================================================
 Package                        Architecture        Version                    Repository           Size
=========================================================================================================
Upgrading:
 almalinux-release              x86_64              8.10-1.el8                 baseos               27 k

Transaction Summary

Upgrade 1 Package

Total size: 27 k Is this ok [y/N]: y Downloading Packages: [SKIPPED] almalinux-release-8.10-1.el8.x86_64.rpm: Already downloaded AlmaLinux 8 - BaseOS 3.3 MB/s | 3.4 kB 00:00 Importing GPG key 0xC21AD6EA: Userid : "AlmaLinux <packager@almalinux.org>" Fingerprint: E53C F5EF 91CE B0AD 1812 ECB8 51D6 647E C21A D6EA From : /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux Is this ok [y/N]: y Key imported successfully Import of key(s) didn't help, wrong key(s)? Public key for almalinux-release-8.10-1.el8.x86_64.rpm is not installed. Failing package is: almalinux-release-8.10-1.el8.x86_64 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux 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

Found the following AlmaLinux blog through reddit, and especially ran the following:

$ sudo rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
$

After this, rerunning sudo dnf upgrade almalinux-release completed successfully. I was then able to install other packages.

Heelara
  • 221
3

With a compliant repo_gpgcheck=1 in /etc/dnf.conf you'll get this error when running dnf upgrade almalinux-release.

Error: Failed to download metadata for repo 'extras': repomd.xml GPG signature verification error: Bad GPG signature

You might try to download a newer GPG key from https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux

Unfortunately it is signed with an expired key:

pub   rsa4096 2021-01-12 [C] [expired: 2024-01-12]
      5E9B8F5617B5066CE92057C3488FCF7C3ABB34F8
uid           AlmaLinux <packager@almalinux.org>
sub   rsa3072 2021-01-12 [S] [expired: 2024-01-12]
pub   rsa4096 2023-10-10 [SC]
      BC5EDDCADF502C077F1582882AE81E8ACED7258B
uid           AlmaLinux OS 8 <packager@almalinux.org>
2

Ignore the Key (Not Recommended):

sudo dnf install nodejs --nogpgcheck # For Amazon Linux

0

first run sudo dnf upgrade almalinux-release --nogpgcheck. After that, dnf update should work normally.

Keem
  • 1