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!