postgresql - CentOS : Postgres 11 yum repo missing repomd. xml(Errno 14 404 未找到)

标签 postgresql centos7 yum

我正在尝试在 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 定义错误的问题?有没有更有效的镜像?

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

最佳答案

我在 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/

相关文章:

sql - 函数/触发器的返回类型?

python - 在 python3.6 上安装 pycrypto

centos - 百胜缓存问题?

macos - psql : could not connect to server: No such file or directory

postgresql - postgres 现在(仅时间)与时间(仅现在时间)进行比较

java - 使用 PostgreSQL 的破管道

linux - 百胜 repo 问题

bash - 如何将多行附加到 dockerfile 中的文件?

redhat - 哪个百胜组包含给定的程序包?

linux - 安装 git-svn 会产生依赖项错误