我正在尝试在 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 不存在。 rhel-2* 在 https://download.postgresql.org/pub/repos/yum/11/redhat/ 中不存在.我如何解决看似 yum 定义错误的问题?有没有更有效的镜像?
最佳答案
我在 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/
关于postgresql - CentOS : Postgres 11 yum repo missing repomd. xml(Errno 14 404 未找到),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53915479/