最近要玩一些新包,需要在4.0以上版本的R 里面跑,需要source安装包“Matrix”,各种报错。
make: *** [Matrix.so] Error 1
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
以为是gcc安装的位置不对,环境变了,以为要重新编写config
参考
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Using-gcc
仔细看完https://cloud.r-project.org/,才发现:
Important: this release uses Xcode 10.1 and GNU Fortran 8.2. If you wish to compile R packages from sources, you will need to download and GNU Fortran 8.2 - see the tools directory.
当时想吐血。安装完gfortran,顺利安装,耗时3小时。
https://github.com/fxcoudert/gfortran-for-macOS/releases
要认真读书。