使用EXTENSIONS创建空间数据库时出错 [英] Error creating a spatial database using EXTENSIONS

查看:55
本文介绍了使用EXTENSIONS创建空间数据库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行 psql -d mydb -c"CREATE EXTENSION postgis;" 时,出现以下错误:

When running psql -d mydb -c "CREATE EXTENSION postgis;" I get the following error:

ERROR:  could not load library "/usr/local/Cellar/postgresql/9.3.4/lib/rtpostgis-2.1.so": dlopen(/usr/local/Cellar/postgresql/9.3.4/lib/rtpostgis-2.1.so, 10): Symbol not found: _sqlite3_column_table_name
      Referenced from: /usr/local/lib/libgdal.1.dylib
      Expected in: /usr/lib/libsqlite3.dylib
     in /usr/local/lib/libgdal.1.dylib
STATEMENT:  CREATE EXTENSION postgis;

系统:OS X 10.9.2
所有库都安装了自制软件.

System: OS X 10.9.2
All libraries were installed with homebrew.

我尝试用自制软件重新安装"gdal","geos","postgresql","postgis",但没有任何运气.我怀疑这可能与sqlite3有关,但不确定.

I tried reinstalling 'gdal', 'geos', 'postgresql', 'postgis' with homebrew without any luck. I'm suspecting it may be something related to sqlite3, but not sure.

推荐答案

问题是它正在使用OS X默认安装的sqlite3库.我可以创建postgis扩展名.

The issue was that it was using the sqlite3 library that is installed by default by OS X. After linking the brewed library using brew link sqlite3 --force I was able to create the postgis extension.

这篇关于使用EXTENSIONS创建空间数据库时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆