我的操作系统为Red Hat Enterprise Linux release 8.9 (Ootpa),之前曾在电脑上安装PG数据库失败了。之后在系统上安装任何组件,都会报这个错。
yum install -y net-tools
PostgreSQL common RPMs for RHEL / CentOS 8 - x86_64 2.3 MB/s | 2.4 kB 00:00
PostgreSQL common RPMs for RHEL / CentOS 8 - x86_64 416 B/s | 659 B 00:01
PostgreSQL common RPMs for RHEL / CentOS 8 - x86_64 2.3 MB/s | 2.4 kB 00:00
PostgreSQL common RPMs for RHEL / CentOS 8 - x86_64 307 B/s | 659 B 00:02
Error: Failed to download metadata for repo 'pgdg-common': repomd.xml GPG signature verification error: Bad GPG signature
从报错信息看,和GPG signature有关。
执行yum install -y net-tools --nogpgcheck
Last metadata expiration check: 0:39:29 ago on Mon 10 Jun 2024 10:42:06 PM EDT.
Package net-tools-2.0-0.52.20160912git.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
如果每条命令都要添加-nogpgcheck不太方便,
那我们进入/etc/yum.repos.d,把pg的安装repo删除 了。
删除后,安装任何组件没报错。