1
我試圖讓postsql和postgis一起工作,但仍然遇到同樣的問題。Postsql和Postgis
使用: 的PostgreSQL 9.2.3(postgres.app)
當我運行:
CREATE EXTENSION postgis;
ERROR: could not access file "$libdir/postgis-2.0": No such file or directory
我也得到了同樣的錯誤,當我運行:
$psql -d myDB -f postgis.sql
psql:postgis.sql:49: ERROR: could not access file "$libdir/postgis-2.0": No such file or directory
當我檢查我的$ libdir
$pg_config --libdir
/Applications/Postgres.app/Contents/MacOS/lib
$pg_config --pkglibdir
/Applications/Postgres.app/Contents/MacOS/lib
如果我檢查目錄,我找到一個文件:postgis-2.0.so
我一直在我的頭反對這幾天,無法弄清楚。
您是否完全確定您是從postgres.app連接到Pg,而不是系統上的其他Pg安裝?另外:在某些平臺上,當庫存在時,「沒有這樣的文件或目錄」會被重新存檔*但是它依賴的庫不會*所以請嘗試'ldd'或任何OS X的等價物來查看是否可能缺少'postgis- 2.0.so' –