我正在研究MacOS Lion。我已经成功地为Postgres和PostGIS设置了PostGIS库,按照正式指示没有任何问题。
我已经到了关于创建空间数据库模板的部分,现在我遇到了一个问题:
$ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
/postgis.sql: No such file or directory我如何调试这个?postgis.sql最初是从哪里来的?
更新:
我只是确定POSTGIS_SQL_PATH实际上已经设置好了,如下所示:
$ POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-1.5
$ echo $POSTGIS_SQL_PATH
/usr/local/Cellar/postgresql/9.1.3/share/postgresql/contrib/postgis-1.5
$ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
/usr/local/Cellar/postgresql/9.1.3/share/postgresql/contrib/postgis-1.5/postgis.sql: No such file or directory看起来似乎存在/usr/local/Cellar/postgresql/9.1.3/share/postgresql/,但它下面没有contrib目录。这是从哪里来的?
发布于 2013-04-02 10:14:56
看来你找不到后遗症。从搜索postgis.sql开始。如果找不到,请安装postgis。如果找到它,那么适当地设置您的路径。
https://stackoverflow.com/questions/10754893
复制相似问题