我正在尝试在EC2 CentOS 7服务器上安装Postgres 11,但无法通过Postgres yum存储库。我尝试安装仓库:
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定义错误的问题?哪里有更有效的镜子?
答案 0 :(得分: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/