![如何使用支持 Java 的 Homebrew 安装 R?](https://linux22.com/image/1304050/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E6%94%AF%E6%8C%81%20Java%20%E7%9A%84%20Homebrew%20%E5%AE%89%E8%A3%85%20R%EF%BC%9F.png)
我一直尝试使用 Homebrew 安装 R 语言,但是当我安装 iplots 等 Java 包时出现以下错误:
* installing *source* package ‘iplots’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Note: On Mac OS X we strongly recommend using iplots from within JGR.
Proceed at your own risk as iplots cannot resolve potential ev.loop deadlocks.
'Yes' is assumed for all dialogs as they cannot be shown without a deadlock,
also ievent.wait() is disabled.
2012-01-29 16:24:57.870 R[29384:c07] Apple AWT Java VM was loaded on first thread -- can't start AWT.
Error : .onLoad failed in loadNamespace() for 'iplots', details:
call: .jnew("org/rosuda/iplots/Framework")
error: java.lang.InternalError: Can't start the AWT because Java was started on the first thread. Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/User/Library/R/2.14/library/iplots’
Warning in install.packages :
installation of package ‘iplots’ had non-zero exit status
ERROR: dependency ‘iplots’ is not available for package ‘JGR’
* removing ‘/Users/User/Library/R/2.14/library/JGR’
Warning in install.packages :
installation of package ‘JGR’ had non-zero exit status
有人告诉我需要使用以下命令安装 R。NOAWT=1 R CMD INSTALL
我不完全确定如何使用 Homebrew 执行此操作。
我尝试过,brew install r --NOAWT=1
但没有成功。