无法安装 webmin(在 CentOS 7 上)软件包更新

无法安装 webmin(在 CentOS 7 上)软件包更新

在CentOS7和Webmin系统上:

当我尝试安装 webmin 软件包更新时出现此错误..:

所有更新都不起作用并给出此错误:

Downloading packages:
warning: /var/cache/yum/x86_64/7/home_csbuild_Perl/packages/perl-IO-Socket-SSL-1.982-1.2.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 04****: NOKEY
Retrieving key from http://download.opensuse.org/repositories/home:/csbuild:/Perl/CentOS_7/repodata/repomd.xml.key


The GPG keys listed for the "Perl Modules (CentOS_7)" 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: perl-IO-Socket-SSL-1.982-1.2.noarch
 GPG Keys are configured as: http://download.opensuse.org/repositories/home:/csbuild:/Perl/CentOS_7/repodata/repomd.xml.key

我尝试更改 gpgcheck=0 但仍然收到相同的错误。

我也尝试过:

gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

并得到这个结果:

pub  4096R/F4A80EB5 2014-06-23 CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>
      Key fingerprint = 6341 AB27 53D7 8A78 A7C2  7BB1 24C6 A8A7 F4A8 0EB5

答案1

我刚刚在我的一台测试服务器上修复了这个问题。

答案在于 Redhat 支持 https://access.redhat.com/solutions/317083

总结如下:

必须验证文件 /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 是否包含未损坏的公钥,该公钥用于验证 Red Hat RPM 软件包的签名。 rpm -V redhat-release-server-6Server 可用于验证密钥文件的完整性。如果这表明该文件已被修改,则

应将文件的未损坏版本(即来自不同的 RHEL 系统)复制到此位置,或者必须重新安装 RPM 软件包 redhat-release-server-6Server,部署新版本的文件 /etc/pki/rpm-gpg /RPM-GPG-KEY-redhat-release。由于此时 RHEL 无法验证包 redhat-release-server-6Server 的签名,因此必须使用命令行选项抑制此检查。

确保正确的文件 /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 就位后,应使用以下命令使 RPM 知道该密钥:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

此步骤将解决该问题。

作为进一步的步骤,应该首先调查为什么 /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 被修改,即部署过程需要修改。

根本原因

当前系统上的 YUM/RPM 不信任用于对即将安装的 RPM 包进行签名的密钥。

顺便说一句,尝试修复你的 yum 键而不是使用 rpm 安装。如果您使用 RPM 安装,那么它将无法处理依赖项,并且 yum 可能会在以后的 yum 更新中破坏您的 webmin 安装。 (如果 yum 删除了 webmin 需要的一些依赖项)

希望这可以帮助!

相关内容