skip to Main Content

I am attempting to install the latest PostGIS 3.0.x on CentOS 8, with no luck.

I don’t think anyone is running PostGIS on RHEL 8 or CentOS 8, I can’t understand why not. It does not seem possible to install.

I have successfully installed Postgres 12.0 by disabling the RHEL AppStream

Steps I took installing postgres 12 on CentOS 8:

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

I am attempting now to install PostGIS.

#dnf list --available | grep postgis30

I see that postgis30_96 is the latest offered (as listed below):

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

When I try to install with the following command:

#dnf install postgis30_96

I get these errors:

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)

I look for xerces-c, and nothing is returned:

#dnf list --available | grep xerces-c

Where do I get xerces-c to install?


I look to see if hdf5 is available to install (dependency)

#dnf list --available | grep hdf5

and nothing is returned. How do I satisfy these dependencies, so that PostGIS will install?

I goto the hdf5 website, download the source and it’s a BIG FAT MESS. The build/install instructions do not work – the code is out of sync with the install instructions.

I check the hdf5 website and find another set of build/install instructions, and they too are out of sync with the latest code base. I don’t know which way is up with this project, if it’s a zombie project out there on the web, seemingly alive, but nobody’s home.

How do I get hdf5 easily onto my system and xerces-c so that nothing existing gets mucked up? I would prefer to install these through any somewhat sanctioned CentOS 8 package repo using dnf.


I can’t log this issue on the PostGIS ticket tracking system. Logging a ticket there requires an OSGEO ID, and when I request a ‘mantra’ to get started, nothing is returned, no response,

OSGEO is yet another zombie project, nobody’s home. https://www.osgeo.org/community/getting-started-osgeo/osgeo_userid/


Please respond only if you have actually done this yourself on a CentOS 8 machine or VM, while I appreciate suggestions, pointers or imaginations from others, it pollutes r/postgis reddit with misinformation, non-working solutions, and not only wastes my time with dead ends, but also the time of others.

Someone else inevitably comes along with the same problems and is misguided with these those that are well-intentioned, but provide incorrect or incomplete information.

7

Answers


  1. The postgis30_96 packages are for Postgres 9.6. You need postgis30_12 for Postgres 12.

    These packages are definitely in the repo, so if your dnf list isn’t seeing them, it may be an instance of a known issue in which “yum/dnf refuse to find/install many packages from PGDG repository on RHEL8”.

    As a workaround, the Postgres Yum Howto recommends this installation procedure:

    dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
    dnf -qy module disable postgresql
    dnf install postgresql11-server postgresql11-contrib
    
    Login or Signup to reply.
  2. I had the same problem and finally found the solution. I need postgis25 for postgresql10, so I typed this command

    dnf --enablerepo=PowerTools install postgis25_10
    

    The PowerTools repo has the packages from codeready-developer repo, from Redhat CodeReady Studio. It contains a lot of useful tools.

    Login or Signup to reply.
  3. Summing up the previous answers, these are the commands needed to install PostGIS-3 on CentOS-8:

    dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
    dnf -qy module disable postgresql
    yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    dnf --enablerepo=PowerTools install postgresql12-server postgresql12-contrib postgis30_12
    
    Login or Signup to reply.
  4. Percona Postgresql 13 And Postgis 3.0

    https://www.percona.com/doc/percona-repo-config/index.html

    dnf remove postgresql
        
    sudo dnf install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
    
    sudo percona-release setup ppg-13
    

    You can refer here:

    https://www.percona.com/doc/postgresql/LATEST/installing.html#using-the-rpm-format

    sudo dnf module disable postgresql
    
    sudo dnf install percona-postgresql13-server
    
    sudo dnf install percona-pg_repack13
    
    sudo dnf install percona-pgaudit
    
    sudo dnf install percona-pgbackrest
    
    sudo dnf install percona-patroni
    
    sudo dnf install percona-pg-stat-monitor13
    
    sudo dnf install percona-postgresql13-contrib
    
    
    /usr/pgsql-13/bin/postgresql-13-setup initdb
    
    
    sudo systemctl start postgresql-13
    

    PostGIS

    dnf -y config-manager --set-enabled PowerTools
    
    dnf install -y postgis30_13 postgis30_13-client
    
    Login or Signup to reply.
  5. Cannot enable PowerTools for RHEL 8
    https://access.redhat.com/discussions/5417621

    Remarks: PowerTools is a CentOS repository. On RHEL 8 we have the CodeReady Builder repository!

    I am now able to install PostGIS-3 for PostgreSQL-12 on RHEL-8.

    Solution:

    sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
    dnf install postgis30_12
    
    Login or Signup to reply.
  6. Many of the answers were helpful. To sum up the steps I had to take and errors in the instructions at https://people.planetpostgresql.org/devrim/index.php?/archives/107-Installing-PostGIS-3.1-and-PostgreSQL-13-on-CentOS-8.html

    1. As mentioned by Marcelo, for RHEL use code-ready, not powertools.
    2. As mentioned in this thread, don’t mix packages. Run dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
      to get the pgdg repo before installing postgres. Then run dnf -qy module disable postgresql if needed then install postgres like sudo dnf install -y postgresql13-server
    3. The command to install epel-repo listed here may not work. Try sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    4. Get the name of the latest postgis release with this command. sudo dnf list --available | grep postgis3 As mentioned by Nick, the second two digits are your postgres version.
    5. Install postgis sudo dnf -y install postgis3x_xx I repeat, the second two digits are your postgres version.

    So, in summary, to install postgres and postgis on my rhel8 sytstem, I ran these commands in this order.

    sudo dnf -qy module disable postgresql
    sudo dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
    sudo dnf install -y postgresql13-server
    sudo /usr/pgsql-13/bin/postgresql-13-setup initdb
    sudo systemctl enable postgresql-13
    sudo systemctl start postgresql-13
    sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
    sudo dnf -y install  postgis31_13
    
    Login or Signup to reply.
  7. What helped me in CentOS container (as a root):

    yum -y install dnf-plugins-core && yum config-manager --set-enabled powertools
    

    Installing dnf-plugins-core and enabling powertools.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search