我正在尝试安装软件包glmnet。 我收到此错误:
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
我安装了自制软件。然后通过gcc fortran实现这一目标。 我发现许多帮助链接都显示类似这样的内容:
“”您将需要使用以下命令将〜/ .R / Makevars /中的编译语句更改为gcc:
VER=-5.3.0
CC=gcc$(VER)
CXX=g++$(VER)
CflaGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
CXXflaGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
FLIBS=-L/usr/local/Cellar/gcc/5.3.0/lib/gcc/5
我在Mac上找不到〜/ .R / Makevars /!我有macOS Catalina 10.15.1。
我找到了两个Makevars文件。它们链接到Rcpp,与上面列出的代码完全没有任何相似之处。
抱歉,这个看似基本的问题,但是两个小时后,我找不到与〜/ .R / Makevars /
相关的任何内容这是我找到的一个文件的状态:
## With R 3.1.0 or later,you can uncomment the following line to tell R to
## enable compilation with C++11 (where available)
##
## Also,OpenmP support in Armadillo prefers C++11 support. However,for wider
## availability of the package we do not yet enforce this here. It is however
## recommended for client packages to set it.
##
## And with R 3.4.0,and RcppArmadillo 0.7.960.*,we turn C++11 on as OpenmP
## support within Armadillo prefers / requires it
CXX_STD = CXX11
PKG_CXXflaGS = $(SHLIB_OPEnmP_CXXflaGS)
PKG_LIBS = $(SHLIB_OPEnmP_CXXflaGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
但这与RcppArmadillo相关。
我已经(很多)读了很多遍了: https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Installation-of-source-packages
Mac OS X R error "ld: warning: directory not found for option"
https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Clang