我正在尝试spdep
在 OS X 10.9 Mavericks 上安装 R 包(),R 3.0.1(sessionInfo
在底部)。该软件包是从http://cran.r-project.org/web/packages/spdep/index.html(源文件spdep_0.5-71.tar.gz
)下载的,我尝试使用R CMD INSTALL
.
问题是终端产生此错误:
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [spdep.so] Error 1
ERROR: compilation failed for package ‘spdep’
* removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/spdep’
我尝试重新安装 Xcode 和我已经拥有的命令行工具。而且我还在终端中安装了gfortran-4.8.2-darwin13.tar.bz2
doing sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2
。但它仍然给我同样的错误。
有什么解决办法吗?
谢谢!
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)