首页 > 解决方案 > 为什么在 RHEL 8 / CentOS 8 上安装 PostGIS 3 是不可能的?

问题描述

我正在尝试在 CentOS 8 上安装最新的 PostGIS 3.0.x,但没有成功。

我认为没有人在 RHEL 8 或 CentOS 8 上运行 PostGIS,我不明白为什么不这样做。似乎无法安装。

我已经通过禁用 RHEL AppStream 成功安装了 Postgres 12.0

我在 CentOS 8 上安装 postgres 12 的步骤:

1)

#dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

2)

#dnf --disablerepo AppStream install postgresql12
#dnf --disablerepo AppStream install postgresql12-server

我现在正在尝试安装 PostGIS。

#dnf list --available | grep postgis30

我看到 postgis30_96 是最新提供的(如下所列):

postgis30_96.x86_64                                  3.0.0alpha4-6.rhel8                                     pgdg96               
postgis30_96-client.x86_64                           3.0.0alpha4-6.rhel8                                     pgdg96               
postgis30_96-client-debuginfo.x86_64                 3.0.0alpha4-6.rhel8                                     pgdg96               
postgis30_96-debuginfo.x86_64                        3.0.0alpha4-6.rhel8                                     pgdg96               
postgis30_96-devel.x86_64                            3.0.0alpha4-6.rhel8                                     pgdg96               
postgis30_96-docs.x86_64                             3.0.0alpha4-6.rhel8                                     pgdg96               
postgis30_96-gui.x86_64                              3.0.0alpha4-6.rhel8                                     pgdg96               
postgis30_96-gui-debuginfo.x86_64                    3.0.0alpha4-6.rhel8                                     pgdg96               
postgis30_96-utils.x86_64                            3.0.0alpha4-6.rhel8                                     pgdg96

当我尝试使用以下命令安装时:

#dnf install postgis30_96

我收到这些错误:

Last metadata expiration check: 1:22:58 ago on Tue 15 Oct 2019 08:25:10 PM UTC.
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides hdf5 needed by postgis30_96-3.0.0alpha4-6.rhel8.x86_64
  - nothing provides xerces-c needed by postgis30_96-3.0.0alpha4-6.rhel8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

我寻找xerces-c,没有返回任何内容:

#dnf list --available | grep xerces-c

我在哪里可以安装xerces-c


我看看hdf5是否可以安装(依赖)

#dnf list --available | grep hdf5

并且什么都没有返回。如何满足这些依赖关系,以便安装 PostGIS?

我去了 hdf5 网站,下载了源代码,这是一个巨大的 FAT MESS。构建/安装说明不起作用 - 代码与安装说明不同步。

我检查了 hdf5 网站并找到了另一组构建/安装说明,它们也与最新的代码库不同步。我不知道这个项目是哪条路,如果它是网络上的一个僵尸项目,看起来还活着,但没人在家。

如何轻松地将 hdf5 安装到我的系统和 xerces-c 上,以免现有的东西被弄乱?我更愿意使用 dnf 通过任何经过认可的 CentOS 8 软件包 repo 安装这些。


我无法在 PostGIS 票务跟踪系统上记录此问题。在那里记录一张票需要一个 OSGEO ID,当我请求“咒语”开始时,什么都没有返回,没有响应,

OSGEO 是另一个僵尸项目,没人在家。https://www.osgeo.org/community/getting-started-osgeo/osgeo_userid/


请仅在您自己在 CentOS 8 机器或 VM 上实际完成此操作时才回复,虽然我感谢其他人的建议、指点或想象,但它会污染 r/postgis reddit 与错误信息、无效的解决方案,而且不仅浪费我的时间死胡同,也是别人的时间。

其他人不可避免地会遇到同样的问题,并被这些善意的问题误导,但提供的信息不正确或不完整。

标签: postgresqlhdf5xerces-cosgeopostgis-installation

解决方案


我遇到了同样的问题,终于找到了解决方案。我需要用于 postgresql10 的 postgis25,所以我输入了这个命令

dnf --enablerepo=PowerTools install postgis25_10

PowerTools 存储库包含来自 Redhat CodeReady Studio 的 codeready-developer 存储库的软件包。它包含许多有用的工具。


推荐阅读