2014-02-22 wcdj
0 Homebrew是啥?
“Homebrew installs the stuff you need that Apple didn’t.——Homebrew 使 OS X 更完整”。
Homebrew的官网[1](多语言版本)简单明了地介绍了如何安装和使用这个工具,并提供了自己的Wiki。
1 安装Homebrew
brew的安装很简单,使用一条ruby命令即可,Mac系统上已经默认安装了ruby。
gerryyang@mba:bin$ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
关于安装brew的详细说明可以参考其github上的wiki说明[2]:
"
Installation
The suggested and easiest way to install Homebrew is on the homepage. We don’t duplicate it here because it is asecurity risk to list it on a user-editable wiki.
The standard script installs Homebrew to /usr/local
so that you don’t need sudo when youbrew install
. It is acareful script, it can be run even if you have stuff installed to/usr/local
already. It tells you exactly what it will do before it does it too. And you have to confirm everything it will do before it starts.
There are other ways to install Homebrew which provide you with more flexibility. They are listed below the requirements.
"gerryyang@mba:~$ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
由于我的系统上已经安装过brew,因此再次执行安装命令会提示我brew已经存在。
2 Homebrew的用法
查看brew的具体用法:
gerryyang@mba:~$brew
Example usage:
brew [info | home | options