我正在尝试为MacOS X安装PostGIS,直到现在,这就是我得到的结果
PostGIS is now configured for x86_64-apple-darwin10.8.0
-------------- Compiler Info -------------
C compiler: gcc -g -O2
C++ compiler: g++ -g -O2
-------------- Dependencies --------------
GEOS config: /usr/local/bin/geos-config
GEOS version: 3.3.3
PostgreSQL config: /usr/local/pgsql/bin/pg_config
PostgreSQL version: PostgreSQL 9.1.3
PROJ4 version: 48
Libxml2 config: /usr/bin/xml2-config
Libxml2 version: 2.7.3
JSON-C support: yes
PostGIS debug level: 0
Perl: /usr/bin/perl
--------------- Extensions ---------------
PostGIS Raster: disabled
PostGIS Topology: enabled
-------- Documentation Generation --------
xsltproc: /usr/bin/xsltproc
xsl style sheets:
dblatex:
convert:
mathml2.dtd: http://www.w3.org/Math/DTD/mathml2/mathml2.dtd这是否意味着现在已经安装了PostGIS?为什么禁用PostGIS光栅?
另外,当我遵循tutorial时,我得到了这个错误
createdb -E UTF8 template_postgis
createdb: could not connect to database postgres: FATAL: role "root" does not exist然后我检查了命令
sudo su - postgres对于echo $?,它返回1
发布于 2012-04-24 03:44:02
这意味着配置了PostGIS,正如第一行所说的那样。
通常,您将继续使用make和make install。完成此操作后,您将准备好PostGIS库,但您必须在数据库级别创建PostGIS支持函数,如下所示:psql -c spatial_ref_sys.sql
我建议您也咨询一下official docs。
您的错误消息意味着您正在尝试使用不存在的用户/数据库连接到数据库。默认情况下,PostgreSQL工具将尝试与您当前的unix用户相匹配的用户名/数据库,该用户名/数据库似乎是root。
请记住,在root帐户下工作是一个非常糟糕的做法。
https://stackoverflow.com/questions/10286929
复制相似问题