参考:http://brew.sh/index_zh-cn.html
以下是我的具体执行过程:
zcms-iMac:~ zcm$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" ==> This script will install: /usr/local/bin/brew /usr/local/Library/... /usr/local/share/man/man1/brew.1 ==> The following directories will be made group writable: /usr/local/. /usr/local/bin ==> The following directories will have their group set to admin: /usr/local/. /usr/local/bin Press RETURN to continue or any other key to abort ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin Password: Sorry, try again. Password: ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin ==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew ==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew ==> Installing the Command Line Tools (expect a GUI popup): ==> /usr/bin/sudo /usr/bin/xcode-select --install xcode-select: note: install requested for command line developer tools Press any key when the installation has completed. ==> Downloading and installing Homebrew... remote: Counting objects: 194283, done. remote: Compressing objects: 100% (52754/52754), done. remote: Total 194283 (delta 140405), reused 194219 (delta 140356) Receiving objects: 100% (194283/194283), 39.05 MiB | 259.00 KiB/s, done. Resolving deltas: 100% (140405/140405), done. From https://github.com/Homebrew/homebrew * [new branch] master -> origin/master HEAD is now at 251605c youtube-dl: update 2014.08.27.1 bottle. ==> Installation successful! ==> Next steps Run `brew doctor` before you install anything Run `brew help` to get started zcms-iMac:~ zcm$
安装完成!
接下来就可以用brew来安装软件了,如安装tree命令:brew install tree