当我试图在OS X 10.11(El Capitan)上通过自制程序安装R时,我一直遇到一个错误

当我试图在OS X 10.11(El Capitan)上通过自制程序安装R时,我一直遇到一个错误,r,homebrew,osx-elcapitan,R,Homebrew,Osx Elcapitan,我可以很好地使用现有版本的R和RStudio,但我似乎无法将/Applications中的版本与El Capitan中的终端同步,这意味着我无法在emacs中使用ESS shermmac:~ brandonsherman$ brew install R ==> Installing r from homebrew/homebrew-science ==> Using Homebrew-provided fortran compiler. This may be changed by

我可以很好地使用现有版本的R和RStudio,但我似乎无法将
/Applications
中的版本与El Capitan中的终端同步,这意味着我无法在emacs中使用ESS

shermmac:~ brandonsherman$ brew install R
==> Installing r from homebrew/homebrew-science
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Downloading http://cran.rstudio.com/src/base/R-3/R-3.2.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/r-3.2.2.tar.gz
==> Patching
patching file src/modules/lapack/vecLibg95c.c
==> ./configure --prefix=/usr/local/Cellar/r/3.2.2_1 --with-libintl-
==> make
Last 15 lines from /Users/brandonsherman/Library/Logs/Homebrew/r/02.make:
5: In as.POSIXlt.POSIXct(x, tz) : unknown timezone 'America/New_York'
clang -I../../../../include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/X11/include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include    -fPIC  -g -O2  -c init.c -o init.o
clang -I../../../../include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/X11/include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include    -fPIC  -g -O2  -c tcltk.c -o tcltk.o
clang -I../../../../include -DNDEBUG -I/usr/local/include -I/usr/local/include -I/usr/X11/include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include    -fPIC  -g -O2  -c tcltk_unix.c -o tcltk_unix.o
making tcltk.d from tcltk.c
making init.d from init.c
making tcltk_unix.d from tcltk_unix.c
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L../../../../lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -o tcltk.so init.o tcltk.o tcltk_unix.o -L/usr/local/lib -ltcl8.6 -L/usr/local/lib -ltk8.6 -L/usr/X11/lib -lX11 -Wl,-weak-lXss -lXext -L../../../../lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
ld: library not found for -lX11
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [tcltk.so] Error 1
make[3]: *** [all] Error 1
make[2]: *** [R] Error 1
make[1]: *** [R] Error 1
make: *** [R] Error 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/homebrew/homebrew-science/issues

Warning:

请注意,警告之后没有任何内容:。

我重新安装了10.10版的命令行工具并重新启动。然后,我通过自制程序安装了R3.2.2,如原问题所示。关于我的gfortran编译器,它给了我以下错误:

dyld: Library not loaded: /usr/local/lib/gcc/5/libgfortran.3.dylib
  Referenced from: /usr/local/Cellar/r/3.2.2_1/R.framework/Versions/3.2/Resources/lib/libR.dylib
  Reason: image not found
dyld: Library not loaded: /usr/local/lib/gcc/5/libgfortran.3.dylib
  Referenced from: /usr/local/Cellar/r/3.2.2_1/R.framework/Versions/3.2/Resources/lib/libR.dylib
  Reason: image not found

brew链接gcc
已消除此错误。R现在可以正常工作。

您重新安装了命令行工具吗?没有,但我更新了XCode。请尝试重新安装命令行工具。我实际上会考虑重做所有的自制程序升级。我刚刚重新安装,并尽最大努力恢复我所需要的,而不是处理这次操作系统更新带来的升级难题。@hrbrmstr我刚刚重新安装了10.10版的命令行工具。我收到了相同的错误消息。由于某种原因,我的自制文件链接到了
gcc5
。使用
brew取消gcc5的链接
,然后
brew链接gcc
对我有效。谢谢