【发布时间】:2017-10-28 22:20:17
【问题描述】:
我在 R v3.4 MacOS sierra 中安装 samr 包时遇到问题。我收到此警告消息:
"Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘samr’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘samr’
trying URL 'https://cran.rstudio.com/src/contrib/samr_2.0.tar.gz'
Content type 'application/x-gzip' length 36702 bytes (35 KB)
==================================================
downloaded 35 KB
* installing *source* package ‘samr’ ...
** libs
gfortran -fPIC -g -O2 -c rankcol.f -o rankcol.o
make: gfortran: No such file or directory
make: *** [rankcol.o] Error 1
ERROR: compilation failed for package ‘samr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/samr’
Warning in install.packages :
installation of package ‘samr’ had non-zero exit status
有没有人想办法克服这个问题?
【问题讨论】:
-
这意味着你需要gfortran编译器。
-
直接从 CRAN 获取 gfortran 是个好主意(见上文),因为每个版本的 R 都是为使用特定版本的 gfortran(通常不是 gcc 中包含的最新版本)而构建的.使用其他版本是更令人困惑的软件包安装错误的常见来源。
标签: r packages bioconductor