我正在尝试在EC2 CentOS 7服务器上安装postgres11,但是无法通过Postgres yum repo。我尝试安装repo:
yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm并得到Errno14HTTPS错误404 -找不到URL https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-2-x86_64/repodata/repomd.xml。
错误是正确的-该URL不存在。rhel-2*在https://download.postgresql.org/pub/repos/yum/11/redhat/中不存在。我如何解决看起来像是yum定义错误的问题?有没有更有效的镜像呢?


发布于 2019-03-15 05:44:22
我在亚马逊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/
https://stackoverflow.com/questions/53915479
复制相似问题