我正试图在RR中安装一个旧的矩阵包。
remotes::install_version("Matrix", version = "1.6-1")
但是,这一错误只是空泛的。
ld: warning: directory not found for option -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 ld: warning: directory not found for option -L/opt/gfortran/lib ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Matrix.so] Error 1 ERROR: compilation failed for package ‘Matrix’
- removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Matrix’
- restoring previous ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Matrix’ Warning message: In i.p(...) : installation of package ‘/var/folders/9z/j49cg7ss6p95_prl4f15j9xw0000gn/T//RtmpsoKABI/remotes56a1226e875/Matrix’ had non-zero exit status
I followed this answer and this tutorial, installing gfortran 12.2 for MacOS ventura. I see that it is in /usr/local/gfortran now. But I got the same error.
我做了什么错误?