我下载了 postgis-2.1.0SVN、autogen、configure 和 make,但是“make check”失败并且日志以
psql:/home/admin/postgis-2.1.0SVN/regress/00-regress-install/share/contrib/postgis/postgis.sql:47:错误:无法加载库“/home/admin/postgis-2.1.0SVN /regress/00-regress-install/lib/postgis-2.1.so”:/home/admin/postgis-2.1.0SVN/regress/00-regress-install/lib/postgis-2.1.so:未定义符号:json_tokener_errors
我在 postgis-2.1.so 上运行 ldd 并得到了
linux-vdso.so.1 => (0x00007fff055ff000)
libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0x00007ffcc79fd000)
libproj.so.0 => /usr/lib/libproj.so.0 (0x00007ffcc77ac000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007ffcc7450000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffcc7091000)
libgeos-3.3.6.so => /usr/local/lib/libgeos-3.3.6.so (0x00007ffcc6d08000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ffcc6a07000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ffcc67f1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ffcc64f5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ffcc62f0000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ffcc60d9000)
/lib64/ld-linux-x86-64.so.2 (0x00007ffcc7ecb000
我从 github 项目构建并安装了 json-c
./configure 响应以:
PostGIS is now configured for x86_64-unknown-linux-gnu
-------------- Compiler Info -------------
C compiler: gcc -g -O2
C++ compiler: g++ -g -O2
SQL preprocessor: /usr/bin/cpp -traditional-cpp -P
-------------- Dependencies --------------
GEOS config: /usr/local/bin/geos-config
GEOS version: 3.3.6
PostgreSQL config: /usr/bin/pg_config
PostgreSQL version: PostgreSQL 9.1.6
PROJ4 version: 48
Libxml2 config: /usr/bin/xml2-config
Libxml2 version: 2.7.8
JSON-C support: yes
PostGIS debug level: 0
Perl: /usr/bin/perl
--------------- Extensions ---------------
PostGIS Raster: disabled
PostGIS Topology: enabled
但我怀疑配置输出中的最后一行:
checking json/json.h usability... yes
checking json/json.h presence... yes
checking for json/json.h... yes
checking for json_object_get in -ljson... no