我最近需要安裝R 3.2獲得來自Bioconductor的工作包,但我安裝好後,我收到以下錯誤:R 3.2,GCC,以及自制
[16:16:11 20] $ r
dyld: Library not loaded: /usr/local/lib/gcc/4.9/libgfortran.3.dylib
Referenced from: /usr/local/Cellar/r/3.2.0/R.framework/Versions/3.2/Resources/lib/libR.dylib
Reason: image not found
Trace/BPT trap: 5
果然,釀造設爲使用gcc 5,所以我告訴釀造使用4.9版本
brew switch gcc 4.9
其中有R運行從,但隨後R.將在包裝的中間安裝失敗(特別是當我跑biocLite('DESeq2')
。
從那以後,我嘗試了一些東西,包括試圖安裝gcc 4.8(但我似乎無法讓R使用它,即使通過~/.R/Makevars
)。即使4.9未安裝,R仍堅持要求上述路徑。
R的Windows版本似乎是說4.9不能與3.2工作:
R-devel temporarily used a new toolchain based on 4.9.2 gcc, put together by Duncan Murdoch using build scripts written by a contractor. However, there were too many incompatibilities with existing code, and this toolchain will not be used for R 3.2.0. See notes for details on building and testing the new toolchain.
任何幫助將不勝感激!
編輯: 我試圖從源代碼安裝,通過@lmw的建議,但它失敗:
[11:27:55 2] $ brew install r --build-from-source
==> Installing r from homebrew/homebrew-science
==> Installing r dependency: gcc
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.1.0/gcc-5.1.0.tar.bz2
######################################################################## 100.0%
curl: (28) Resolving timed out after 5542 milliseconds
Trying a mirror...
==> Downloading https://ftp.gnu.org/gnu/gcc/gcc-5.1.0/gcc-5.1.0.tar.bz2
######################################################################## 100.0%
==> Patching
patching file gcc/jit/Make-lang.in
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/usr/local/Cellar/gcc/5.1.0 --libdir=/usr/local/Cellar/gc
==> make bootstrap
==> make install
==> Caveats
GCC has been built with multilib support. Notably, OpenMP may not work:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670
If you need OpenMP support you may want to
brew reinstall gcc --without-multilib
==> Summary
/usr/local/Cellar/gcc/5.1.0: 1351 files, 248M, built in 32.5 minutes
==> Installing r
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Downloading http://cran.rstudio.com/src/base/R-3/R-3.2.0.tar.gz
######################################################################## 100.0%
==> Patching
patching file src/modules/lapack/vecLibg95c.c
==> ./configure --prefix=/usr/local/Cellar/r/3.2.0_1 --with-libintl-prefix=/usr/local/opt/gettext --enable-memory-pro
==> make
** installing vignettes
** testing if installed package can be loaded
* DONE (survival)
make[1]: *** [recommended-packages] Error 2
make: *** [stamp-recommended] Error 2
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-science/issues
編輯2: 只是爲了好玩,我嘗試安裝r
沒有--build-from-source
選項,它工作。請參閱下面的解決方案(我認爲從源代碼構建可能已經解決了升級問題,這可以解決問題,但是我得到的結果是而不是要去嘗試它(事情終於再次起作用了......爲什麼要使用它?),但是我想知道是否我可以刪除我在~/.R/Makevars
設置變量(再次,見下面的解決方案)。
我現在也在處理這個相同的問題! – stanekam
相關閱讀:https://github.com/Homebrew/homebrew-science/issues/2286 – stanekam
不知道我是怎麼錯過的!謝謝@iShouldUseAName! – muppetjones