使用Homebrew安装R [英] Installing R with Homebrew
问题描述
我正在尝试使用Homebrew安装R.我运行了在SO上其他地方推荐的这些命令:
I'm trying to install R using Homebrew. I ran these commands which are recommended elsewhere on SO:
brew tap homebrew/science
brew install R
对于brew tap homebrew/science
,我收到此错误:
Error: Already tapped!
对于第二个命令,我收到以下消息:
For the second command, I receive this:
Error: No available formula for r
有什么建议吗?
推荐答案
截至2017年,它只是brew install r
.参见下面的@Andrew的答案.
As of 2017, it's just brew install r
. See @Andrew's answer below.
从2014年开始(使用优胜美地),方法如下:
As of 2014 (using an Yosemite), the method is the following:
brew tap homebrew/science
brew install Caskroom/cask/xquartz
brew install r
homebrew/science
龙头中的gcc
软件包(将作为必需的依赖项自动安装)已经包含最新的fortran编译器(gfortran
),并且最重要的是:整个软件包都已预编译,因此可以节省您的时间.很多编译时间.
The gcc
package (will be installed automatically as a required dependency) in the homebrew/science
tap already contains the latest fortran compiler (gfortran
), and most of all: the whole package is precompiled so it saves you a lot of compilation time.
此答案也适用于El Capitan和Mac OS Sierra.
This answer will also work for El Capitan and Mac OS Sierra.
如果您没有XCode命令行工具(CLT),请从终端运行:
In case you don't have XCode Command Line Tools (CLT), run from terminal:
xcode-select --install
这篇关于使用Homebrew安装R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!