我想在R鍵安裝包「rjags」但我遇到了以下錯誤:在我的Mac在OSX小牛[R安裝rjags
Loading required package: rjags
Error : .onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so
Expected in: /usr/local/lib/libjags.3.dylib
in /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so
Error: package ‘rjags’ could not be loaded
我已經安裝了JAGS(運行小牛)我正在運行R-3.1.2。我試着用devtools
包從URL安裝的建議,這site:
install_url("http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz",
args="--configure-args='--with-jags-include=/Users/casallas/homebrew/opt/jags/include/JAGS
--with-jags-lib=/Users/casallas/homebrew/opt/jags/lib'
"
)
我也通過了說明在這other site,嘗試不同版本JAGS並收到同樣的錯誤。我無法接受下一步的嘗試,並確信解決方案很簡單。有沒有人有任何見解?非常感謝!
檢查問題是否有什麼關係RStudio與否,即,打開右Gui,並嘗試安裝。如果它沒有在那裏工作(可能是這種情況),那麼你知道這個問題只是一個R問題,而不是RStudio問題(我們可以從你的問題中刪除第一個音頻標籤和引用)。 – Gregor 2015-02-10 01:02:21
我正在運行JAGS 3.4.0 – Archimeow 2015-02-10 01:08:06
@JMeo加載庫後,我能夠獲得CRAN版本的'rjags'(3.4.0) - http://downloads.sourceforge.net/project/mcmc-jags/ JAGS/3。X/Mac的%20OS%20X/JAGS-小牛-3.4.0.dmg R = HTTP%3A%2F%2Fsourceforge.net%2Fprojects%2Fmcmc-V形凹口%2Ffiles%2FJAGS%2F3.x%2FMac%2520OS%2520X% 2F&ts = 1423539048&use_mirror = softlayer-dal - 然後執行'install.packages(「rjags」)'。如果您仍然遇到問題,可以嘗試通過「open -a RStudio」啓動RStudio。 – hrbrmstr 2015-02-10 03:34:58