无法在 CentOS 7 上下载存储库“pgdg-common”的元数据

axy*_*axy 14 linux centos stream

当我尝试在CentOS Stream 8 上安装或更新软件包时,出现以下错误:

cd ~
sudo yum update
Run Code Online (Sandbox Code Playgroud)

输出:

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
Run Code Online (Sandbox Code Playgroud)

我尝试在 CentOS 7 服务器上安装Docker或仅更新软件包或库。

服务器详细信息

cd ~
hostnamectl
Run Code Online (Sandbox Code Playgroud)

输出:

   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
Run Code Online (Sandbox Code Playgroud)

spr*_*pry 20

参考

对于 CentOS 7:

yum --disablerepo=* -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Run Code Online (Sandbox Code Playgroud)


Auc*_*Auc 14

你可以试试:

rpm -Uvh https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Run Code Online (Sandbox Code Playgroud)

但对我来说,这并没有解决问题。在找到正确的解决方案之前,对我来说,重命名以下文件是有效的:

cd /etc/yum.repos.d/
mv pgdg-redhat-all.repo pgdg-redhat-all.repo.old
yum update -y
Run Code Online (Sandbox Code Playgroud)

至少,它应该让您现在安装和更新软件包。


小智 7

我也在Rocky Linux 8 虚拟机上看到了这个问题。

我们的木偶运行早在 2024 年 1 月 5 日就开始抱怨存储库下载的签名。

这是我们面临的问题以及解决方案(至少对我们来说):