【问题标题】:Unable to install PostgreSQL 9.5/PostGIS 2.3 on CentOS 7无法在 CentOS 7 上安装 PostgreSQL 9.5/PostGIS 2.3
【发布时间】:2018-11-07 21:01:34
【问题描述】:

在我的 CentOS 7 (x86_64) 机器上,我正在尝试通过 PostgreSQL's yum repository 安装 PostgreSQL 9.5/PostGIS 2.3,使用 this 教程。

根据教程,当我进行第二步时。

sudo rpm -ivh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm

上面写着:

Retrieving http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
Preparing...                          ################################# [100%]
package pgdg-centos95-9.5-3.noarch (which is newer than pgdg-centos95-9.5-2.noarch) is already installed

然后,我尝试查看此 rpm 中可用的软件包:

sudo yum list | grep pgdg95

我明白了,

libevent.x86_64               2.0.22-1.rhel7               @pgdg95
python-babel.noarch           1.3-1.rhel7                  @pgdg95
python-jinja2.noarch          2.8-7.rhel7                  @pgdg95
python-markupsafe.x86_64      0.23-11.rhel7                @pgdg95

这不是按照安装教程中的步骤3。有人可以建议我安装有什么问题吗,或者有没有其他方法可以安装 PostgreSQL 9.5/PostGIS 2.3?

【问题讨论】:

  • 这个answer 会搞定的。
  • @rdj7:愿意发表您的评论作为答案吗?我很乐意接受。非常感谢您指出链接。
  • ohh 抱歉,我以为它会解决您的问题。在我发布任何答案之前,我想知道您在执行yum list postgres* 时会看到什么,并且您是否尝试了上述答案中的前两个步骤,因为它在本地安装了 rpm
  • 是的,它解决了这个问题。您可以发表以上评论作为答案吗?

标签: linux postgresql centos


【解决方案1】:

请确保您已通过运行sudo yum repolist 安装了 pgdg 和 EPEL 存储库。如果 EPEL 不在列表中,只需安装它sudo yum install epel-release

【讨论】:

  • 正如我从#sudo yum install epel-release 中看到的,EPEL 存储库已经安装。我已经根据 cmets 编辑了问题。
【解决方案2】:

请参考这个ANSWER

  1. 检查yum list postgres* 如果您看到所需的软件包,那就太好了。 如果您仍然没有看到所需的软件包,请按照给定答案中的给定步骤操作,

# vi /etc/yum.repos.d/CentOS-Base.repo

# yum localinstall http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm

# yum list postgres*

如果您检查第二步,我们可以看到它在本地安装后local install,理想情况下您应该能够看到所需的列表。

希望对你有帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-24
    • 2016-11-15
    • 2017-05-27
    • 2019-04-06
    • 2020-06-20
    相关资源
    最近更新 更多