如何在 CentOS 5 上安装 PostgreSQL 9.2?

如何在 CentOS 5 上安装 PostgreSQL 9.2?

PostgreSQL 9.2 在 CentOS 上不可用(最新版本是 8.1),因此为了获取它,必须使用以下命令添加 postgre 存储库

rpm -ivh http://yum.postgresql.org/9.2/redhat/rhel-5-i386/pgdg-centos92-9.2-6.noarch.rpm

(按照或者)。

然而,当我尝试这样做时,我得到的唯一答案是

检索http://yum.postgresql.org/9.2/redhat/rhel-5-i386/pgdg-centos92-9.2-6.noarch.rpm 错误:跳过http://yum.postgresql.org/9.2/redhat/rhel-5-i386/pgdg-centos92-9.2-6.noarch.rpm- 传输失败 - 未知或意外错误

“未知或意外错误”没有什么帮助。

我已经验证该软件包确实存在。如何调试这些 rpm 错误?

答案1

已成功安装在我的机器上。它是 CentOS 6.3,但我认为这并不重要。也许这只是暂时的问题。您是否尝试过从其他服务器安装?您可以使用 yum downloadonly 然后传输 RPM。无论如何,我安装了它,并且如预期的那样,它创建了一个名为 /etc/yum.repos.d/pgdg-92-centos.repo 的文件,其中包含以下数据,因此您可以手动执行并继续:


[pgdg92]
name=PostgreSQL 9.2 $releasever - $basearch
baseurl=http://yum.postgresql.org/9.2/redhat/rhel-$releasever-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-92

[pgdg92-source]
name=PostgreSQL 9.2 $releasever - $basearch - Source
failovermethod=priority
baseurl=http://yum.postgresql.org/srpms/9.2/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-92

相关内容