Problem creating PostGIS template database

Posted by omat on Stack Overflow See other posts from Stack Overflow or by omat
Published on 2011-01-04T17:57:46Z Indexed on 2011/01/08 11:53 UTC
Read the original article Hit count: 310

Filed under:
|
|

I am trying to build a template geographic database for PostGIS (1.5) on Mac OS X Snow Leopard (10.6) for my GeoDjango application.

I am following: http://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#creating-a-spatial-database-template-for-postgis

I've managed to come up to the point where the provided postgis.sql should be run (i.e. psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql)

At that point I am getting an error at the first SQL statement that is tried to be run. When I try that on the psql prompt the result is as follows:

template_postgis=# CREATE OR REPLACE FUNCTION st_spheroid_in(cstring) RETURNS spheroid AS '/usr/local/pgsql/lib/postgis-1.5','ellipsoid_in' LANGUAGE 'C' IMMUTABLE STRICT;
NOTICE:  type "spheroid" is not yet defined
DETAIL:  Creating a shell type definition.
ERROR:  could not load library "/usr/local/pgsql/lib/postgis-1.5.so": dlopen(/usr/local/pgsql/lib/postgis-1.5.so, 10): Symbol not found: _DatumGetFloat4
  Referenced from: /usr/local/pgsql/lib/postgis-1.5.so
  Expected in: /opt/local/lib/postgresql83/bin/postgres 
 in /usr/local/pgsql/lib/postgis1.5.so

Any ideas what might have been messed up?

© Stack Overflow or respective owner

Related posts about osx

Related posts about postgis