PostGIS psqlostgis ERROR could not load library /usr/lib/postgresql/8.4/lib/postgis-1.5.so
Trying to install PostGIS and you can’t get past this error?
psqlostgis.sql:57: NOTICE: type “spheroid” is not yet defined
DETAIL: Creating a shell type definition.
psqlostgis.sql:57: ERROR: could not load library “/usr/lib/postgresql/8.4/lib/postgis-1.5.so”: /usr/lib/postgresql/8.4/lib/postgis-1.5.so: undefined symbol: GEOSHausdorffDistance
psqlostgis.sql:63: ERROR: current transaction is aborted, commands ignored until end of transaction block
psqlostgis.sql:68: ERROR: current transaction is aborted, commands ignored until end of transaction block
DETAIL: Creating a shell type definition.
psqlostgis.sql:57: ERROR: could not load library “/usr/lib/postgresql/8.4/lib/postgis-1.5.so”: /usr/lib/postgresql/8.4/lib/postgis-1.5.so: undefined symbol: GEOSHausdorffDistance
psqlostgis.sql:63: ERROR: current transaction is aborted, commands ignored until end of transaction block
psqlostgis.sql:68: ERROR: current transaction is aborted, commands ignored until end of transaction block
A simple solution to your problem is the following voodoo command
sudo /sbin/ldconfig
Check out it’s voodoo magic at ldconfig
As far as my feeble mind can determine, it links some files or something.. What I know is that it has saved my colleagues ass once before and mine when I was setting up a Red Hat install for ruby on rails.
Enjoy your Postgresql PostGIS geographic goodness!
Related Posts
Posted on March 10, 2010 at 12:44 pm by Jordan Carter · Permalink
In: Ruby on Rails, Server Config · Tagged with: error, ldconfig, PostGIS, postgresql, problem
In: Ruby on Rails, Server Config · Tagged with: error, ldconfig, PostGIS, postgresql, problem
on March 10, 2010 at 5:40 pm
Permalink
I cant believe it! you saved me a lot of time!
Thank you!!
on May 19, 2010 at 7:37 am
Permalink
I was getting the same error. “ldconfig” did not help, but I used “ldd” and found some old LibXML libraries. I then searched for old GEOS library files and found some in the PostgreSQL utils library.
I removed the libgeos files from the PostgreSQL utils library, and the PostGIS installation worked.
on June 28, 2010 at 11:03 pm
Permalink
Ouch, it took me about 15 minutes to find your post, plus another hour since I first tried fixing this myself. Didn’t expect a THAT easy solution, but thanks alot!
on August 31, 2010 at 7:19 pm
Permalink
Hi,
thanks to these comments, I worked out where to start looking to fix my issue.
I had postgres installed via EnterpriseDB which bundled an old version of postgis.
I installed the following libraries from source:
geos
proj4
postgis
but postgis failed to install with a similar error: undefined symbol: GEOSHausdorffDistance
after moving old lib files and replacing with new copies from /usr/local/lib it worked for me:
1) backup lib files:
cd /opt/PostgresPlus/8.4SS/lib
mkdir backup
mv libgeos* backup
mv libproj* backup
2) copy in newer lib files
cp /usr/local/lib/libgeos* ./
cp /usr/local/lib/libproj* ./
after thses steps, running the postgis.sql script worked.
on November 29, 2011 at 8:37 pm
Permalink
apt-get install geos =)))