1.Homebrew是啥东东?

Homebrew的官方网站http://brew.sh/index.html上有这么一句“Homebrew installs the stuffyouneed that Apple didn’t.”,能够通过终端方便的使用它安装管理苹果没有自带的UNIX相关工具软件。官方中文页面也给出的“OS X 不可或缺的套件管理器”的说明。

2.Homebrew的安装

官方给出的说明为在MAC终端上运行:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

当然在安装之前可以考虑尝试看本机是否已经安装,执行一下升级

brew update

  

看到“Already up-to-date.”的时候说明已经一切就绪。

3.Homebrew的使用

3.1 常见命令

输入以下命令:

brew -h

可以看到如下结果:

guoyufudeMBP:~ GuoYufu$ brew -h
Example usage:
brew [info | home | options ] [FORMULA...]
brew install FORMULA...
brew uninstall FORMULA...
brew search [foo]
brew list [FORMULA...]
brew update
brew upgrade [--all | FORMULA...]
brew pin/unpin [FORMULA...] Troubleshooting:
brew doctor
brew install -vd FORMULA
brew [--env | config] Brewing:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md Further help:
man brew
brew home

 3.2 下载常用tool

git:

brew install git

wget:

brew install wget

  

05-03 22:59