![](/img/trans.png)
[英]ActiveRecord::StatementInvalid: PG::InternalError: ERROR: parse error - invalid geometry
[英]PostGIS Error - PG::InternalError: ERROR: could not load library
StandardError: An error has occurred, this and all later migrations canceled:
PG::InternalError: ERROR: could not load library "/usr/local/Cellar/postgresql/9.4.5/lib/postgis-2.1.so": dlopen(/usr/local/Cellar/postgresql/9.4.5/lib/postgis-2.1.so, 10): Symbol not found: __ZN5boost7archive21basic_binary_iarchiveINS0_15binary_iarchiveEE13load_overrideERNS0_15class_name_typeEi
Referenced from: /usr/local/lib/libSFCGAL.1.dylib
Expected in: /usr/local/lib/libboost_serialization-mt.dylib
in /usr/local/lib/libSFCGAL.1.dylib
: CREATE EXTENSION IF NOT EXISTS "postgis"/Users/harshamv/Sites/clink/db/migrate/20150812164615_enable_postgis.rb:3:in `change'
-e:1:in `<main>'
ActiveRecord::StatementInvalid: PG::InternalError: ERROR: could not load library "/usr/local/Cellar/postgresql/9.4.5/lib/postgis-2.1.so": dlopen(/usr/local/Cellar/postgresql/9.4.5/lib/postgis-2.1.so, 10): Symbol not found: __ZN5boost7archive21basic_binary_iarchiveINS0_15binary_iarchiveEE13load_overrideERNS0_15class_name_typeEi
Referenced from: /usr/local/lib/libSFCGAL.1.dylib
Expected in: /usr/local/lib/libboost_serialization-mt.dylib
in /usr/local/lib/libSFCGAL.1.dylib
: CREATE EXTENSION IF NOT EXISTS "postgis"
/Users/harshamv/Sites/clink/db/migrate/20150812164615_enable_postgis.rb:3:in `change'
-e:1:in `<main>'
PG::InternalError: ERROR: could not load library "/usr/local/Cellar/postgresql/9.4.5/lib/postgis-2.1.so": dlopen(/usr/local/Cellar/postgresql/9.4.5/lib/postgis-2.1.so, 10): Symbol not found: __ZN5boost7archive21basic_binary_iarchiveINS0_15binary_iarchiveEE13load_overrideERNS0_15class_name_typeEi
Referenced from: /usr/local/lib/libSFCGAL.1.dylib
Expected in: /usr/local/lib/libboost_serialization-mt.dylib
in /usr/local/lib/libSFCGAL.1.dylib
/Users/harshamv/Sites/clink/db/migrate/20150812164615_enable_postgis.rb:3:in `change'
-e:1:in `<main>'
當我試圖刪除並重新創建我的Rails-PostgreSQL時,我突然得到了上述錯誤
你可能最近升級了boost
家釀公式做了brew update
/ brew upgrade
,而且似乎是最新版本不會打得很好postgis
。
我通過返回上一版本的boost
修復了一個非常類似的問題:
brew switch boost 1.58.0
更新 :現在已經在Homebrew中修復了,下面的答案建議做一個簡單的更新/升級可能是要走的路。 如果你以前切換過,你現在可以brew switch boost 1.59.0
升級到最新版本的boost
,你可能還需要brew reinstall postgis
。
此問題已在此處修復 。 重新安裝它應該工作。
$ brew update && upgrade
$ brew install postgis
找不到1.58.0,但1.55.0_1可用並成功安裝了postgis給我。 effectif和stackoverflow中的這些條目非常有用。 該過程可能有額外的步驟。
只是要確定:
$ brew uninstall postgis
點擊自制版本,如果還沒有:
$ brew tap homebrew/versions
找到最新的:
$ brew search boost
...
homebrew/versions/boost155
...
$ brew install homebrew/versions/boost155
這將根據不同的公式( boost155
)安裝boost。 為了能夠切換版本,我將舊版本符號鏈接到boost目錄:
$ ln -s /usr/local/Cellar/boost155/1.55.0_1 /usr/local/Cellar/boost/1.55.0_1
在此之后它照常營業:
$ brew switch boost 1.55.0_1
$ brew install postgis
如果您需要安裝特定版本的公式,請查看此主題:
我也遇到了這個問題,並且版本1.56.0的boost
可用並為我解決了這個問題。 看起來這個問題特別適用於1.58.0。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.