postgresql11 - postgis/pg_routing

Hello All,
I am new to openSUSE. i understand that postgresql10 and [FONT=Verdana]postgresql9 has rpm for postgis and pg_routing extensions.
But I couldn’t manage to find above extensions rpm for [FONT=Verdana]postgresql11. may I know is that any particular reason behind!

If I would like to build for my own for [FONT=Verdana]postgresql11, how do I proceed that ![/FONT][/FONT][/FONT]
Thanks in advance.

RK

I am not sure, but I do not see any postgresql 11 packages on openSUSE 15.1. Which most probably means that that version was not released (or did not pass the testng) in time for openSUSE 15.1.

PostgreSQL 11 is available for LEAP 15.1 in the server:database repo.

I took a few minutes and determined…
postgis hasn’t been supported for quite awhile on openSUSE, but it’s not unusual.
If you look at the following page which describes a maze of misc info, you’ll find that the old release in the documentation is not supported in PostgreSQL 10 or 11, and their build status for a multitude of distros and PostgresQL versions is very spotty.
http://trac.osgeo.og/postgis/wiki/UsersWikiPostgreSQLPostGIS

If there is any hope to get this working almost anywhere including openSUSE you should probably start at the following along with its broken links…
https://postgis.net/install/

You should try to compile on your own and see if it works, download the latest source and try the simplest commands on this page
https://postgis.net/source/

If the simplest instructions don’t work, the following contains instructions for specific distros but all the most recent are Debian type distros which would at least have to be re-interpreted for an RPM system and work out the differences…
http://trac.osgeo.org/postgis/wiki/UsersWikiInstall

Another option…
It looks like postgi is included in Anaconda (a massive collection of python apps which run in their own python environment) but there are no details so I can’t know how useful that version of postgis is.

Any questions or other issues, you can post again.

TSU

Thanks both.

Hello tsu2,

I am new to Postgresql , but i could see the following rpms for postgresql10 at the below specified links, but unable to find for postgresql11 !! :slight_smile:
https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Leap_15.1/x86_64/postgresql10-pgRouting-2.6.1-lp151.5.3.x86_64.rpm
https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Leap_15.1/x86_64/postgresql10-postgis-2.5.2-lp151.1.28.x86_64.rpm

If it’s working for postgresql10 , meaning does it support for postgresql11 !! as well. But there is no rpm for both extensions, Any specific reason behind !

“You should try to compile on your own and see if it works, download the latest source and try the simplest commands on this page”

Yes, manual compilation works. But i am trying to make things via rpm. Since community provides rpm with well tested one. I am wonder why there is no two extensions with an rpm.

it would be greatly appreciated , if i get a guidance for creating rpm for pgRouting.
postgis got created custom rpm from the previous version of SRPM

curious to know why postgrsql11 not included in “https://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/”!!

Thanks a lot for your time and response.

I wrote the following Wiki article how to find files and apps
https://en.opensuse.org/User:Tsu2/Missing_Files_Dependencies

The fourth option which is to search http://software.opensuse.org/search/ will locate any supported version of PostgreSQL and provide you with a one-click install (You have to be using Firefox from openSUSE to use the one-click install). You will find PostgreSQL 11 available from a number of personal repos, but I recommend the server:database repo because it’s more “community” supported.
This is not unusual, the OSS repo only contains “most used” versions but later versions of Server applications like PostgreSQL and other special uses are very often found in additional repos.

The PostgreSQL geospatial extensions aren’t created and managed by anyone in openSUSE although it looks like it might have been awhile ago.
So, through neglect it isn’t currently.

If it builds successfully for you, that’s your best short term solution.
The documentation is unclear but I suspect that postgis 2.5(or 3.0) should work fine with both PostgreSQL 10 and 11.
Postgis 2.1 which used to be available (and seems not to be any more) seems to have worked only up to PG 9.
You can submit a feature request to https://bugzilla.opensuse.org related your successful build experience to have it built as an RPM (your experience will likely help your request get approved to at least try) so that an RPM might be available in the future.

TSU

Thanks for your response.

Update:

Here is the SRPM that i used to create postgis 2.5.2 for postgresql11

https://download.opensuse.org/repositories/Application:/Geo/openSUSE_Leap_15.1/src/postgresql10-postgis-2.5.2-lp151.1.28.src.rpm

Updated as below:

%define pgname postgresql10 becomes %define pgname postgresql11

got error as “error: Architecture is not included: x86_64”

So comment all ExclusiveArch: do_not_build (#ExclusiveArch: do_not_build)

Output as below:

Wrote: /home/admin/rpmbuild/SRPMS/postgresql11-postgis-2.5.2-lp151.1.28.src.rpm
Wrote: /home/admin/rpmbuild/RPMS/x86_64/postgresql11-postgis-2.5.2-lp151.1.28.x86_64.rpm
Wrote: /home/admin/rpmbuild/RPMS/x86_64/postgresql11-postgis-devel-2.5.2-lp151.1.28.x86_64.rpm
Wrote: /home/admin/rpmbuild/RPMS/x86_64/postgresql11-postgis-utils-2.5.2-lp151.1.28.x86_64.rpm
Wrote: /home/admin/rpmbuild/RPMS/x86_64/liblwgeom-2_5-0-2.5.2-lp151.1.28.x86_64.rpm

pg_Routing : Still working on it. If anyone help on that how to create rpm that would be greatly help here.

Thanks in advance…

For pg-routing,
Looks like their links to RPM packages are all broken…
https://pgrouting.org/download.html

But their github repo looks active
https://github.com/pgRouting/pgrouting

AFAICS their source packages don’t exist, so you’ll likely have to clone the github source for whatever you want to build…

TSU

Wanted also to install PostGIS but I am on Thumbleweed, so I did s “zypper se postgis” and quite some package show up:


> sudo zypper se postgis
Loading repository data...
Reading installed packages...

S | Name                             | Summary                                                 | Type      
--+----------------------------------+---------------------------------------------------------+-----------
  | postgresql10-postgis             | Geographic Information Systems Extensions to PostgreSQL | package   
  | postgresql10-postgis             | Geographic Information Systems Extensions to PostgreSQL | srcpackage
  | postgresql10-postgis-debuginfo   | Debug information for package postgresql10-postgis      | package   
  | postgresql10-postgis-debugsource | Debug sources for package postgresql10-postgis          | package   
  | postgresql10-postgis-devel       | Development files for postgresql10-postgis              | package   
  | postgresql10-postgis-utils       | The utils for PostGIS                                   | package   
  | postgresql11-postgis             | Geographic Information Systems Extensions to PostgreSQL | package   
  | postgresql11-postgis             | Geographic Information Systems Extensions to PostgreSQL | srcpackage
  | postgresql11-postgis-debuginfo   | Debug information for package postgresql11-postgis      | package   
  | postgresql11-postgis-debugsource | Debug sources for package postgresql11-postgis          | package   
  | postgresql11-postgis-devel       | Development files for postgresql11-postgis              | package   
  | postgresql11-postgis-utils       | The utils for PostGIS                                   | package   
  | postgresql94-postgis             | Geographic Information Systems Extensions to PostgreSQL | package   
  | postgresql94-postgis             | Geographic Information Systems Extensions to PostgreSQL | srcpackage
  | postgresql94-postgis-debuginfo   | Debug information for package postgresql94-postgis      | package   
  | postgresql94-postgis-debugsource | Debug sources for package postgresql94-postgis          | package   
  | postgresql94-postgis-devel       | Development files for postgresql94-postgis              | package   
  | postgresql94-postgis-utils       | The utils for PostGIS                                   | package   
  | postgresql95-postgis             | Geographic Information Systems Extensions to PostgreSQL | package   
  | postgresql95-postgis             | Geographic Information Systems Extensions to PostgreSQL | srcpackage
  | postgresql95-postgis-debuginfo   | Debug information for package postgresql95-postgis      | package   
  | postgresql95-postgis-debugsource | Debug sources for package postgresql95-postgis          | package   
  | postgresql95-postgis-devel       | Development files for postgresql95-postgis              | package   
  | postgresql95-postgis-utils       | The utils for PostGIS                                   | package   
  | postgresql96-postgis             | Geographic Information Systems Extensions to PostgreSQL | package   
  | postgresql96-postgis             | Geographic Information Systems Extensions to PostgreSQL | srcpackage
  | postgresql96-postgis-debuginfo   | Debug information for package postgresql96-postgis      | package   
  | postgresql96-postgis-debugsource | Debug sources for package postgresql96-postgis          | package   
  | postgresql96-postgis-devel       | Development files for postgresql96-postgis              | package   
  | postgresql96-postgis-utils       | The utils for PostGIS                                   | package 

So I tried to install the latest version and that installs fine:


> sudo zypper in postgresql96-postgis
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 7 NEW packages are going to be installed:
  postgresql postgresql11 postgresql11-server postgresql96 postgresql96-postgis postgresql96-server postgresql-server

The following 2 recommended packages were automatically selected:
  postgresql11 postgresql11-server

7 new packages to install.
Overall download size: 13.2 MiB. Already cached: 0 B. After the operation, additional 76.4 MiB will be used.

I have the Application:Geo repository enabled.

Not all good and well, created a gis database and tried to enable the postgis extension, but that did not work:


gis=# CREATE EXTENSION postgis;
ERROR:  could not open extension control file "/usr/share/postgresql11/extension/postgis.control": No such file or directory

postgresql11…, I installed postgresql96-postgis (got some postgresql11 packages bonus with it) and checked, there is /usr/share/postgresql96/extension/postgis.control.
Checking further I see postgresql96 is old (9.6) while 11 seems to be the latest so did a “sudo zypper rm postgresql96” and “sudo zypper in postgresql11-postgis”.
Tried “CREATE EXTENSION postgis;” again and that works.

So if you want to install PostGIS 11 direct, do just


> sudo zypper in postgresql11-postgis