CentOS:Postgres 11 yum repo缺少repomd.xml(Errno 14 404 Not Found)

问题描述 投票:1回答:1

我正在尝试在EC2 CentOS 7服务器上安装Postgres 11,但无法通过Postgres yum回购。我尝试安装repo:

yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm

并获取[Errno 14] HTTPS错误404 - 找不到URL https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-2-x86_64/repodata/repomd.xml

错误是正确的 - 该URL不存在。在https://download.postgresql.org/pub/repos/yum/11/redhat/中不存在rhel-2 *。我怎样才能解决看似yum定义错误的问题?某处有更有效的镜子吗?

yum install fails to add repo because of (valid) 404 error yum repolist shows same 404 error

postgresql centos7 yum
1个回答
0
投票

我在Amazon Linux 2上遇到了同样的问题。

这对我有用:

sudo rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
sudo sed -i "s/rhel-\$releasever-\$basearch/rhel-7.5-x86_64/g" "/etc/yum.repos.d/pgdg-11-centos.repo"
sudo yum install postgresql11

在这里找到正确的第二个声明:https://installvirtual.com/how-to-install-postgresql-11-on-amazon-ec2-amazon-linux/

© www.soinside.com 2019 - 2024. All rights reserved.