【发布时间】:2011-03-23 17:01:24
【问题描述】:
更新:我以为我已经解决了,但我没有……请看下文。
我正在 Mac OSX 上安装 GeoDjango。我关注了Mac install instructions,一切顺利,现在是creating a spatial database template for PostGIS。
但是,当我尝试加载 PostGIS SQL 例程时,我得到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
出了什么问题,我该如何解决?
我找到了these instructions from postgis IRC,但我认为我正在运行正确版本的 pg_config 等:
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
我从KyngChaos 安装了 postgres 及其 PostGIS 扩展。如果我查看/usr/local/pgsql/lib,那里有一个名为postgis-1.5.so 的文件,所以我不明白为什么找不到它。
【问题讨论】:
-
这很可能不是整个错误消息 - 在“错误:当前事务已中止,...”之前应该有一些内容。
-
是的,有,抱歉。第一个错误是: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 (I '已经更新了问题以显示这一点)。
-
您可以在专用站点gis.stackexchange.com找到更多有关GIS相关问题的专家解答
标签: postgresql geocoding postgis geodjango