GeoDjango:';没有这样的文件或目录';创建PostGIS空间数据库模板时

GeoDjango:';没有这样的文件或目录';创建PostGIS空间数据库模板时,django,osx-lion,postgis,geodjango,django-postgresql,Django,Osx Lion,Postgis,Geodjango,Django Postgresql,我正在研究MacOS Lion。我已经成功地为博士后和博士后地理信息系统建立了Kyngcaso库,并且没有任何问题 我已经到了创建一个的部分,现在我遇到了一个问题: $ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql /postgis.sql: No such file or directory 我如何调试这个?postgis.sql首先来自哪里 更新: 我只是确保实际设置了POSTGIS\u SQL\u PATH,如下所示:

我正在研究MacOS Lion。我已经成功地为博士后和博士后地理信息系统建立了Kyngcaso库,并且没有任何问题

我已经到了创建一个的部分,现在我遇到了一个问题:

$ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
/postgis.sql: No such file or directory
我如何调试这个?
postgis.sql
首先来自哪里

更新:

我只是确保实际设置了
POSTGIS\u SQL\u 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/ceral/postgresql/9.1.3/share/postgresql/
,但它下面没有
contrib
目录。这是从哪里来的?

你似乎找不到postgis。首先搜索postgis.sql。如果找不到,则安装postgis。如果找到了,请正确设置路径。

看起来您安装了postgresql,但没有安装postgis。。。您能否对postgis.sql进行全局搜索,并查看它是否存在?