Update: thought I'd solved it, but I hadn't... please see below.
I'm installing GeoDjango on Mac OSX. I've followed the Mac install instructions, which all went smoothly, and am now creating a spatial database template for PostGIS.
However, when I try to load the PostGIS SQL routines, I get ERROR: could not access file "$libdir/postgis-1.5": No such file or directory
:
postgres$ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:59: ERROR: could not access file "$libdir/postgis-1.5": No such file or directory
<snip>
psql:/usr/local/pgsql/share/contrib/postgis-1.5/postgis.sql:7785: ERROR: type "geometry" does not exist
What's going wrong, and how can I fix it?
I found these instructions from postgis IRC, but I think I'm running the right version of pg_config, etc:
postgres$ which pg_config
/usr/local/pgsql/bin//pg_config
postgres$ which psql
/usr/local/pgsql/bin//psql
postgres$ pg_config --pkglibdir
/usr/local/pgsql/lib
I installed postgres and its PostGIS extensions from KyngChaos. If I look in /usr/local/pgsql/lib
, there is a file called postgis-1.5.so
there, so I don't understand why it's not being found.