Error creating a spatial database using EXTENSIONS

主宰稳场 提交于 2021-02-10 09:42:52

问题


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;

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

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.


回答1:


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.




回答2:


I encountered the same issue. My fix was :

brew link --overwrite jpeg

Hope this helps!



来源:https://stackoverflow.com/questions/23269978/error-creating-a-spatial-database-using-extensions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!