【发布时间】:2019-10-29 15:06:38
【问题描述】:
我正在尝试使用
在 R 中安装包 gradientForestinstall.packages("gradientForest", repos="http://R-Forge.R-project.org")
我收到了这个错误
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
我已经尝试过 this thread 和 this thread 的答案。
根据这些线程,我使用
安装了 gccbrew install gcc
我的 Makevars 看起来像
## With Rcpp 0.11.0 and later, we no longer need to set PKG_LIBS as there is
## no user-facing library. The include path to headers is already set by R.
#PKG_LIBS =
## With R 3.1.0 or later, you can uncomment the following line to tell R to
## enable compilation with C++11 (or even C++14) where available
CXX_STD = CXX17
VER=-9
CC=gcc$(VER)
CXX=g++$(VER)
CXX11=g++$(VER)
CXX14=g++$(VER)
CXX17=g++$(VER)
CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
FLIBS=-L`gfortran -print-file-name=libgfortran.dylib | xargs dirname`
但不幸的是,它并没有改变我遇到的错误。 我的 R 版本是 3.6.1,我在 MacOS Catalina 上。
如果有人能帮助我,我将不胜感激。 谢谢
【问题讨论】:
标签: r gcc clang gfortran macos-catalina