先安装Git,打开一个shell
cd / usr / localsudo mkdir homebrewcurl - L https : //github.com/mxcl/homebrew/tarball/master | sudo tar xz --strip 1 -C homebrewcd homebrew/bin./brew -vfile brewcat brew | moresudo ./brew update
在".bash_profile"中更新路径配置(如果~下没有文件 ".bash_profile" 请执行: touch '.bash_profile'vim '.bash_profile'加入export PATH=$PATH:/usr/local/homebrew/bin
之后可以直接执行brew(不用./brew)
使用brew安装其他软件包的测试./brew install wget./brew uninstall wget可见brew是一个很有用的包管理工具。