[postgis-users] CentOS : postgis compatibility with postgresql.

Regina Obe lr at pcorp.us
Fri Sep 10 21:30:54 PDT 2021


Hmm if you install postgis with the version of PostgreSQL like below, it should install PG 12 since that one depends on PG 12 (it's all in the name)

# this is for pg12
yum install postgis31_12

#this is for pg11
yum install postgis31_11

That said, I usually install PostgreSQL first and make sure all looks good before I start installing  non-contrib extensions.
Below are scribblings from my notes last time I did this.  Things may have changed a bit since, but hopefully this helps.

To install a PostgreSQL version in Centos using yum.postgresql.org

#this will install 12 client and contrib extensions (those packaged with PostgreSQL)
# change the 12 with the version you want to install.
yum install postgresql12 postgresql12-server postgresql12-contrib

#this one if you need to compile custom extensions, this didn't work for me in older centos because of the clang compiler differences, I couldn't get a new enough clang
yum install postgresql12-devel

Then initialize the cluster

#initialize cluster  by default cluster will be created in /var/lib/pgsql/12/data
/usr/pgsql-12/bin/postgresql-12-setup initdb

# start
systemctl start postgresql-12

#configure to start on reboot
systemctl enable postgresql-12


pre-10 is a bit different
yum install postgresql96 postgresql96-server postgresql96-libs postgresql96-contrib postgresql96-devel
#initialize cluster 
/usr/pgsql-9.6/bin/postgresql96-setup initdb  #creates here /var/lib/pgsql/9.6/data

> -----Original Message-----
> From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On
> Behalf Of postgo at khiplus.fr
> Sent: Wednesday, September 8, 2021 3:16 AM
> To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
> Subject: Re: [postgis-users] CentOS : postgis compatibility with postgresql.
> 
> Yes thx i can install all theses postgis versions.
> Sorry my question was not clear.
> But postgis dependencies install the postgresql 11.13 version by default, my
> question is more to know if (and how) i can choose a specific postgresql
> version : ex : postgresql11-11.2-1PGDG.rhel7.x86_64
> ?
> I don't know how to do that in centos...
> 
> Regards,
> 
> Le 07.09.2021 18:49, Regina Obe a  crit :
> > Yes.
> >
> > It looks like for PG 11 you can do 2.5, 3, or 3.1
> > https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-
> x86_64/
> >
> > So try the below to get 3.0 for 11
> >
> > yum install postgis30_11
> >
> > To get 3.1 for 11
> >
> > yum install postgis31_11
> >
> > For 9.6 I've done:
> >
> > install postgis24_96
> >
> > for example -- so the version of PostgreSQL is always at the end and
> > the number after PostGIS corresponds to the PostGIS minor version.
> >
> >
> > Only caution is I think each might have different dependencies and
> > PostGIS 3.1 may overwrite PostGIS 3.0 since we stripped the minor
> > version in lib by default.
> >
> > Hope that helps,
> > Regina
> >
> >> -----Original Message-----
> >> From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On
> >> Behalf Of postgo at khiplus.fr
> >> Sent: Tuesday, September 7, 2021 11:56 AM
> >> To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
> >> Subject: Re: [postgis-users] CentOS : postgis compatibility with
> >> postgresql.
> >>
> >> Thanks, it pass.
> >>
> >> An other question but it is possible to choose the postgresql version
> >> to install with postgis ?
> >>
> >> Regards
> >>
> >> Le 07.09.2021 16:01, Regina Obe a  crit :
> >> > Those dependencies I believe are included in
> >> >
> https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-7-
> >> x86
> >> > _64
> >> >
> >> > as noted in this thread
> >> >
> >> > https://lists.osgeo.org/pipermail/postgis-devel/2021-August/029136.
> >> > htm
> >> > l
> >> >
> >> > So you need to add that as well.
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org]
> >> >> On Behalf Of postgo at khiplus.fr
> >> >> Sent: Tuesday, September 7, 2021 9:30 AM
> >> >> To: postgis-users at lists.osgeo.org
> >> >> Subject: [postgis-users] CentOS : postgis compatibility with
> >> >> postgresql.
> >> >>
> >> >> Hi,
> >> >>
> >> >> For some tests, i am searching a way to install postgis with a
> >> >> postgresql
> >> > 11 on
> >> >> an old centos (7.5).
> >> >> Is there some list about compatibility of postgis and postgresql 11 ?
> >> >> i
> >> > can see
> >> >> that :
> >> >> https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS
> >> >> I found it on the 7.5 :  postgresql-9.2.23/24 (no postgis
> >> >> available) But i
> >> > need
> >> >> to upgrade in a 11's version.
> >> >>
> >> >> Then i made a new repository with postgresql 11 :
> >> >> https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7.5-
> >> >> x86_64/
> >> >>
> >> >> To install by example postgresql11 (11.13) isn't a problem, but
> >> >> when i
> >> > want
> >> >> to install postgis 2.5 there's dependency's problems :
> >> >>
> >> >> # yum install postgis25_11.x86_64
> >> >> Loaded plugins: fastestmirror, ovl Loading mirror speeds from
> >> >> cached hostfile
> >> >>   * base: centos-mirror.usessionbuddy.com
> >> >>   * extras: centos-mirror.usessionbuddy.com
> >> >>   * updates: centos-mirror.usessionbuddy.com Resolving
> >> >> Dependencies
> >> >> --> Running transaction check
> >> >> ---> Package postgis25_11.x86_64 0:2.5.5-5.rhel7 will be installed
> >> >> --> Processing Dependency: proj72 >= 7.2.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: geos39 >= 3.9.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: gdal32-libs >= 3.2.3 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: xerces-c for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: postgresql11-contrib for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: postgresql11 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency:
> >> >> libprotobuf-c.so.1(LIBPROTOBUF_C_1.0.0)(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: json-c for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: hdf5 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: SFCGAL for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libtiff.so.5()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libprotobuf-c.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libproj.so.19()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libjson-c.so.2()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgeos_c.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgdal.so.28()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libSFCGAL.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Running transaction check
> >> >> ---> Package json-c.x86_64 0:0.11-4.el7_0 will be installed
> >> >> ---> Package
> >> >> ---> libtiff.x86_64 0:4.0.3-35.el7 will be installed
> >> >> --> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2)(64bit) for
> >> >> package: libtiff-4.0.3-35.el7.x86_64
> >> >> --> Processing Dependency: libjpeg.so.62()(64bit) for package:
> >> >> libtiff-4.0.3-35.el7.x86_64
> >> >> --> Processing Dependency: libjbig.so.2.0()(64bit) for package:
> >> >> libtiff-4.0.3-35.el7.x86_64
> >> >> ---> Package postgis25_11.x86_64 0:2.5.5-5.rhel7 will be installed
> >> >> --> Processing Dependency: proj72 >= 7.2.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: geos39 >= 3.9.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: gdal32-libs >= 3.2.3 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: hdf5 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: SFCGAL for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libproj.so.19()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgeos_c.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgdal.so.28()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libSFCGAL.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> ---> Package postgresql11.x86_64 0:11.13-1PGDG.rhel7 will be
> >> >> ---> installed
> >> >> --> Processing Dependency: postgresql11-libs(x86-64) =
> >> >> 11.13-1PGDG.rhel7
> >> >> for package: postgresql11-11.13-1PGDG.rhel7.x86_64
> >> >> --> Processing Dependency: systemd-sysv for package:
> >> >> postgresql11-11.13-1PGDG.rhel7.x86_64
> >> >> --> Processing Dependency: libicu for package:
> >> >> postgresql11-11.13-1PGDG.rhel7.x86_64
> >> >> --> Processing Dependency: libpq.so.5()(64bit) for package:
> >> >> postgresql11-11.13-1PGDG.rhel7.x86_64
> >> >> ---> Package postgresql11-contrib.x86_64 0:11.13-1PGDG.rhel7 will
> >> >> ---> be
> >> >> installed
> >> >> --> Processing Dependency: postgresql11-server(x86-64) =
> >> >> 11.13-1PGDG.rhel7 for package:
> >> >> postgresql11-contrib-11.13-1PGDG.rhel7.x86_64
> >> >> --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for
> >> >> package: postgresql11-contrib-11.13-1PGDG.rhel7.x86_64
> >> >> --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for
> >> >> package: postgresql11-contrib-11.13-1PGDG.rhel7.x86_64
> >> >> --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for
> >> >> package: postgresql11-contrib-11.13-1PGDG.rhel7.x86_64
> >> >> --> Processing Dependency: libxslt.so.1()(64bit) for package:
> >> >> postgresql11-contrib-11.13-1PGDG.rhel7.x86_64
> >> >> ---> Package protobuf-c.x86_64 0:1.0.2-3.el7 will be installed
> >> >> ---> Package
> >> >> ---> xerces-c.x86_64 0:3.1.1-10.el7_7 will be installed
> >> >> --> Running transaction check
> >> >> ---> Package jbigkit-libs.x86_64 0:2.0-11.el7 will be installed
> >> >> Package
> >> >> ---> libicu.x86_64 0:50.2-4.el7_7 will be installed Package
> >> >> ---> libjpeg-turbo.x86_64 0:1.2.90-8.el7 will be installed Package
> >> >> ---> libxslt.x86_64 0:1.1.28-6.el7 will be installed Package
> >> >> ---> postgis25_11.x86_64 0:2.5.5-5.rhel7 will be installed
> >> >> --> Processing Dependency: proj72 >= 7.2.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: geos39 >= 3.9.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: gdal32-libs >= 3.2.3 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: hdf5 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: SFCGAL for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libproj.so.19()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgeos_c.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgdal.so.28()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libSFCGAL.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> ---> Package postgresql11-libs.x86_64 0:11.13-1PGDG.rhel7 will be
> >> >> installed
> >> >> ---> Package postgresql11-server.x86_64 0:11.13-1PGDG.rhel7 will
> >> >> ---> be
> >> >> installed
> >> >> ---> Package systemd-sysv.x86_64 0:219-78.el7_9.3 will be
> >> >> ---> installed
> >> >> --> Processing Dependency: systemd = 219-78.el7_9.3 for package:
> >> >> systemd-sysv-219-78.el7_9.3.x86_64
> >> >> --> Running transaction check
> >> >> ---> Package postgis25_11.x86_64 0:2.5.5-5.rhel7 will be installed
> >> >> --> Processing Dependency: proj72 >= 7.2.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: geos39 >= 3.9.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: gdal32-libs >= 3.2.3 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: hdf5 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: SFCGAL for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libproj.so.19()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgeos_c.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgdal.so.28()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libSFCGAL.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> ---> Package systemd.x86_64 0:219-57.el7 will be updated Package
> >> >> ---> systemd.x86_64 0:219-78.el7_9.3 will be an update
> >> >> --> Processing Dependency: systemd-libs = 219-78.el7_9.3 for package:
> >> >> systemd-219-78.el7_9.3.x86_64
> >> >> --> Processing Dependency:
> >> >> --> libcryptsetup.so.12(CRYPTSETUP_2.0)(64bit)
> >> >> for package: systemd-219-78.el7_9.3.x86_64
> >> >> --> Processing Dependency: libcryptsetup.so.12()(64bit) for package:
> >> >> systemd-219-78.el7_9.3.x86_64
> >> >> --> Running transaction check
> >> >> ---> Package cryptsetup-libs.x86_64 0:1.7.4-4.el7 will be updated
> >> >> ---> Package cryptsetup-libs.x86_64 0:2.0.3-6.el7 will be an
> >> >> ---> update Package postgis25_11.x86_64 0:2.5.5-5.rhel7 will be
> >> >> ---> installed
> >> >> --> Processing Dependency: proj72 >= 7.2.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: geos39 >= 3.9.1 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: gdal32-libs >= 3.2.3 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: hdf5 for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: SFCGAL for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libproj.so.19()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgeos_c.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libgdal.so.28()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> --> Processing Dependency: libSFCGAL.so.1()(64bit) for package:
> >> >> postgis25_11-2.5.5-5.rhel7.x86_64
> >> >> ---> Package systemd-libs.x86_64 0:219-57.el7 will be updated
> >> >> ---> Package
> >> >> ---> systemd-libs.x86_64 0:219-78.el7_9.3 will be an update
> >> >> --> Finished Dependency Resolution
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: hdf5
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: libproj.so.19()(64bit)
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: libSFCGAL.so.1()(64bit)
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: gdal32-libs >= 3.2.3
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: libgeos_c.so.1()(64bit)
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: SFCGAL
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: geos39 >= 3.9.1
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: proj72 >= 7.2.1
> >> >> Error: Package: postgis25_11-2.5.5-5.rhel7.x86_64 (postgresql)
> >> >>             Requires: libgdal.so.28()(64bit)
> >> >>   You could try using --skip-broken to work around the problem
> >> >>   You could try running: rpm -Va --nofiles --nodigest
> >> >>
> >> >>
> >> >> Do you know a solution to install postgis with postgresql 11 ?
> >> >>
> >> >> Is it necessary to install with sources (./configure; make; make
> >> >> install
> >> >> ?)
> >> >>
> >> >>
> >> >> Best regards,
> >> >> _______________________________________________
> >> >> postgis-users mailing list
> >> >> postgis-users at lists.osgeo.org
> >> >> https://lists.osgeo.org/mailman/listinfo/postgis-users
> >> >
> >> > _______________________________________________
> >> > postgis-users mailing list
> >> > postgis-users at lists.osgeo.org
> >> > https://lists.osgeo.org/mailman/listinfo/postgis-users
> >> _______________________________________________
> >> postgis-users mailing list
> >> postgis-users at lists.osgeo.org
> >> https://lists.osgeo.org/mailman/listinfo/postgis-users
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



More information about the postgis-users mailing list