我已经将 Centos7 服务器升级到 Centos8,然后升级到 Almalinux 8.8。如果我运行dnf 更新我遇到任何软件包的错误。我已删除 yum,因此我使用 dnf。我尝试过dnf 全部清理但当我这样做时问题又出现了dnf 更新。这是我的更新日志的最后一部分。我尝试更新的每个包都出现相同的错误!
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
我也尝试过这个:
$ rpm --import "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux"
$ dnf clean packages
我不确定这是否相关,因为我正在尝试安装 leapp-upgrade,但出现此错误
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
答案1
可能是您的密钥已过期。它们是 almalinux-release 包的一部分,因此请先运行dnf upgrade almalinux-release
。之后其他包应该会再次验证。
答案2
您需要一个较新的 GPG 密钥https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
不幸的是,它是使用过期的密钥签名的:
pub rsa4096 2021-01-12 [C] [expired: 2024-01-12]
5E9B8F5617B5066CE92057C3488FCF7C3ABB34F8
uid AlmaLinux <[email protected]>
sub rsa3072 2021-01-12 [S] [expired: 2024-01-12]
pub rsa4096 2023-10-10 [SC]
BC5EDDCADF502C077F1582882AE81E8ACED7258B
uid AlmaLinux OS 8 <[email protected]>
因此,对于合规repo_gpgcheck=1在/etc/dnf.conf
运行时您将收到此错误dnf upgrade almalinux-release
。
Error: Failed to download metadata for repo 'extras': repomd.xml GPG signature verification error: Bad GPG signature
答案3
忽略密钥(不推荐):
sudo dnf install nodejs --nogpgcheck # 对于 Amazon Linux