我已按照以下说明进行操作这里在 AlmaLinux 上安装 Postgresql。但错误仍然存在。
$ sudo yum install -y postgresql15-server
错误:
PostgreSQL 9.6 for RHEL/CentOS 8 - x86_64 564 B/s | 146 B 00:00
Errors during downloading metadata for repository 'pgdg96':
- Status code: 404 for https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-8-x86_64/repodata/repomd.xml (IP: 87.238.57.227)
Error: Failed to download metadata for repo 'pgdg96': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
但当
sudo yum install -y https://ftp.postgresql.org/pub/repos/yum/common/pgdg-centos8-
sysupdates/redhat/rhel-8-x86_64/repodata/repomd.xml
它返回了相同的错误。
检查 HREL 版本
$ 主机名
Static hostname: 89.162.205.92.host.secureserver.net
Icon name: computer-vm
Chassis: vm
Machine ID: 08e54cb75f274905b94df9482e6eb3ba
Boot ID: cf3ba98fd2d64b57acae1711a4dee431
Virtualization: kvm
Operating System: **AlmaLinux 8.7** (Stone Smilodon)
CPE OS Name: cpe:/o:almalinux:almalinux:8::baseos
Kernel: Linux 4.18.0-425.19.2.el8_7.x86_64
Architecture: x86-64
更新:
现在我已将 RHEL 版本更改为 8这里提供的代码几乎相同,但出现相同的错误:
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
PostgreSQL 9.6 for RHEL/CentOS 8 - x86_64 659 B/s | 146 B 00:00
Errors during downloading metadata for repository 'pgdg96':
- Status code: 404 for
https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-8-x86_64/repodata/repomd.xml
Error: Failed to download metadata for repo 'pgdg96': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
更新2
$ sudo dnf install --refresh postresql-server
AlmaLinux 8 - BaseOS 7.7 kB/s | 3.8 kB 00:00
AlmaLinux 8 - AppStream 7.8 kB/s | 4.1 kB 00:00
AlmaLinux 8 - Extras 6.3 kB/s | 3.8 kB 00:00
google-chrome 25 kB/s | 1.3 kB 00:00
Panopta Repository 15 kB/s | 2.9 kB 00:00
PostgreSQL common RPMs for RHEL/CentOS 8 - x86_ 18 kB/s | 3.0 kB 00:00
PostgreSQL 12 for RHEL/CentOS 8 - x86_64 43 kB/s | 3.8 kB 00:00
PostgreSQL 11 for RHEL/CentOS 8 - x86_64 19 kB/s | 3.8 kB 00:00
PostgreSQL 10 for RHEL/CentOS 8 - x86_64 3.8 kB/s | 3.8 kB 00:00
No match for argument: postresql-server
Error: Unable to find a match: postresql-server