Broken PostGIS install after rebuilding GDAL - postgresql

I'm having some problems with Postgres/PostGIS after rebuilding my GDAL library:(
I wanted to add MrSID support in GDAL so rebuilt it with the MrSID SDK. Everything compiled ok and I am now able to open Raster .sid files within QGIS.
BUT I seem to have screwed my Postgres 9.3 install as now I have no PostGIS support. If I try and open previously functioning postgis databases in QGIS I get a ton of error messages indicating that my database has no working PostGIS support.
When I look at my databases in PGADMIN3 I get the following error:
ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": /usr/lib/postgresql/9.3/lib/postgis-2.1.so: undefined symbol: GEOSHausdorffDistance
The postgis-2.1.so library is definitely present on my system and was working fie before I recompiled GDAL.
I'm running Ubuntu 13.10, Postgres 9.3, PostGIS 2.1, and GDAL 1.10.
This is how I compiled GDAL 1.10:
./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc --with-curl=yes --with-mrsid=/usr/local/MrSID_DSDK/Raster_DSDK --with-mrsid_lidar=/usr/local/MrSID_DSDK/Lidar_DSDK --with-poppler=yes --with-jasper=yes --with-opencl=no --with-ogdi=no
Anyone have any idea how to fix this? Do I need to recompile Postgis against Gdal?!
Really appreciate any help with this for as usual I urgently need to use my postgis data!
Thanks
Marty

The simplest way was to just rebuild everything - thanks #joop

Related

Postgresql 12 doesn´t find PostGIS extension on CentOS 8

I´m trying to get PostGIS working, but it seems that Postgresql doesn´t find the extension. My server is running on CentOS 8, the Postgresql is version 12. I installed Postgresql 12 first via dnf module enable postgresql:12 etc..
Afterwards I installed PostGIS and followed the description on the PostGIS website (https://people.planetpostgresql.org/devrim/index.php?/archives/102-Installing-PostGIS-3.0-and-PostgreSQL-12-on-CentOS-8.html). But when I try to run CREATE EXTENSION postgis; I get the error ERROR: could not access file "$libdir/postgis-3": No such file or directory SQL state: 58P01 I figured out that the needed files reside in a subdirectory "bitcode". Therefore I tried to symlink the content in the $libdir directory above - but didn´t help. Even copying them in the directory didn´t - same error. What am I missing?
Thank you and best regards,
Goetz
You have a mix of packages installed: Some from the CentOS distribution, some from the PostgreSQL site. That will lead to trouble.
Uninstall the PostgreSQL packages that do not have PGDG in them and make sure to disable them as shown in the link you show. Then install the PGDG packages for PostGIS

Error installing PostGIS for PostgreSQL on Mac

I'm trying to install PostgreSQL with its PostGIS extension on Mac. The installation happens in two parts : 1) PostgreSQL and 2) PostGIS through the stack builder. The first phase goes smoothly, but the second phase returns the following error at the beginning of the installation of PostGIS:
I trying installing it with the latest version of PostgreSQL as well (version 12), and I get the same error. Any idea what is happening here?
I have the same issue when I install PostGIS by Stack Builder on MacOS.
After many times trying to install/uninstall PostGIS. Finally, I installed it successfully by manual installation.
I think this issue caused by your MacOS doesn't have or conflict in the default app for extracting .zip file.
I have fixed it by install manually, like the following:
Download PostGIS by Stack Builder as usual
Open the folder where you have downloaded PostGIS (often it is /Users/yourUserName)
Extract the PostGIS zip file (the file name like this: edb_postgis_...)
Install PostGIS app
Finally, everything is done! You have installed it successfully!

Could not find libhdf5.so.6 during CREATE EXTENSION postgis

i tried to create extension for postgis in postgresql 9.5. I've already follow from here
But it doesn't work like i expected. I got error ERROR: could not load library "/usr/pgsql-9.5/lib/rtpostgis-2.2.so": libhdf5.so.6: cannot open shared object file: No such file or directory when i execute CREATE EXTENSION postgis
I have had install this on my other machine which run ubuntu. But this machine using centos 6. am i missing something? please help.
Looks like the package you need is hdf5
There have been a fair number of problems reported with this library (a quick google search is helpful), but you may try making sure you can find libhdf5.so.6 on your system and if not reinstalling the rpm.
If that doesn't work, build the library from source or find an alternate version for download?

Postgis - Failed to install it on linux mint mate 17

I install postgis via sudo apt-get install postgis postgresql-9.3-postgis-2.1
Then execute CREATE EXTENSION postgis; but got following error tip:
ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so":
/usr/lib/postgresql/9.3/lib/postgis-2.1.so: undefined symbol: HeapTupleHeaderGetDatum
I am using postgresql 9.3.4, and postgis-2.1.
I did google for over an hour, but didn't found a solution that really solve my issue.
Any help?
I spend another hour, and finally tried to install it from source code, and succeed like a charm, no single issue occur!
Here is the link provide detail steps to install postgis from source code:
http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21Ubuntu1404src
It also works for my Linux mint mate 17, which is base on ubuntu 14.04.
The first two hits seem to say basically the same thing to me:
http://www.postgresql.org/message-id/A9A6BC42-D2E2-471B-BFB0-F6A72EF42911#conundrum.com
https://github.com/pgRouting/pgrouting/issues/271
It sounds to me like your version of postgis was built against a version of postgresql later than 9.3.4 which included a bugfix that included "HeapTupleHeaderGetDatum". So - upgrade your postgresql (you do have something more recent than .4?) and/or make sure you get postgis from the same repo as your postgresql packages.
See if that helps.

Installing mongo_fdw

I am trying to install mongo_fdw on Ubuntu but I am getting some compilation errors. I have installed mongodb, postgresql 9.1, postgresql-server-dev and libpq-dev using apt-get.
I have updated the $PATH as instructed, cd to the directory with the mongo_fdw sources and typed make.
The code starts compiling but then I get errors (some objects and methods aren't found). What am I missing?
It's possible that the extension you're using expects the 9.2 version of the foreign data wrapper API, which has read/write support. Without details like exact errors it's impossible to say for sure.