Sep 2, 2011
Nathan Thom

Upgrading PostGIS


I am upgrading a PostgreSQL test server from 8.3 to 9.0, as well as PostGIS from 1.3 to 1.5. At one stage I kept getting the following error while trying to install the PostGIS database.

$ psql mydb -f postgis.sql
SET
BEGIN
psql:postgis.sql:59: ERROR:  could not load library "/usr/pgsql-9.0/lib/postgis-1.5.so": /usr/pgsql-9.0/lib/postgis-1.5.so: undefined symbol: GEOSHausdorffDistance
psql:postgis.sql:65: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:postgis.sql:70: ERROR:  current transaction is aborted, commands ignored until end of transaction block
-snip-

After a lot of head banging (the brick wall kind, not the heavy metal kind), I figured out I still had the old version of the GEOS library:

# yum list geos
Loaded plugins: rhnplugin, security
Excluding Packages from rhel5s-x86_64 - Base (RPData)
Finished
Excluding Packages from rhel5s-x86_64 - Updates (RPData)
Finished
Installed Packages
geos.x86_64                                                                                                    2.2.3-2.rhel5                                                                                                     installed
Available Packages
geos.x86_64                                                                                                    3.2.2-1.rhel5                                                                                                     postgresql9

A quick upgrade of GEOS to v3 and all was well.

$ psql mydb -f postgis.sql
SET
BEGIN
CREATE FUNCTION
CREATE FUNCTION
-snip-
Pages:1234567...58»

Article Series

Kick Ass PostgreSQL Books

Kick Ass Oracle Books

I've read lots of Oracle books, but these are by far the best I've encountered:

Categories