当我尝试在 CentOS Stream 8 上安装或更新软件包时,出现此错误:
[root@e2e-101-138 \~\]# sudo yum update
PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64 613 B/s | 659 B 00:01
PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64 1.6 MB/s | 1.7 kB 00:00
PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64 503 B/s | 659 B 00:01
Error: Failed to download metadata for repo 'pgdg-common': repomd.xml GPG signature verification error: Bad GPG signature
我尝试安装 Docker 或只是更新我的 CentOS 7 服务器上的软件包或库。
cd ~
hostnamectl # As root
输出:
Static hostname: e2e-101-138
Icon name: computer-vm
Chassis: vm
Machine ID: 7bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Boot ID: c0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Virtualization: kvm
Operating System: CentOS Stream 8
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-529.el8.x86_64
Architecture: x86-64
参考
对于 CentOS 7:
yum --disablerepo=* -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
我也在 Rocky 8 虚拟机上看到此问题。
我们的木偶运行从 1 月 5 日早些时候开始抱怨存储库下载的签名。
这就是我们的问题以及解决方案(至少对我们来说)
https://www.postgresql.org/message-id/4f803fbc884177e5ead5e54dee52db5048d21110.camel%40gunduz.org https://yum.postgresql.org/news/pgdg-rpm-repo-gpg-key-update/
你可以尝试:
rpm -Uvh https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
但对我来说,这并没有解决问题。 在找到正确的解决方案之前,对我来说,有效的方法是重命名以下文件:
cd /etc/yum.repos.d/
mv pgdg-redhat-all.repo pgdg-redhat-all.repo.old
yum update -y
至少,它应该让您现在安装和更新软件包。
存储库 URL 可能已损坏。
对于 CentOS 7 运行:
sudo rpm -Uvh https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
然后:
yum update -y