Homebrew官网html
将次命令粘贴至终端:git
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
使用 Homebrew 安装 Apple 没有预装但 你须要的东西。github
$ brew install wget
Homebrew 会将软件包安装到独立目录,并将其文件软连接至 /usr/local
。ruby
$ cd /usr/local $ find Cellar Cellar/wget/1.16.1 Cellar/wget/1.16.1/bin/wget Cellar/wget/1.16.1/share/man/man1/wget.1 $ ls -l bin bin/wget -> ../Cellar/wget/1.16.1/bin/wget
Homebrew 不会将文件安装到它自己目录以外,因此您可将 Homebrew 安装到任意位置。curl
轻松建立你本身的 Homebrew 包。url
$ brew create https://foo.com/bar-1.0.tgz Created /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/bar.rb
彻底基于 git 和 ruby,因此自由修改的同时你仍能够轻松撤销你的变动或与上游更新合并。code
$ brew edit wget # 使用 $EDITOR 编辑!
安装软件orm
$ brew install xxx
卸载软件htm
brew uninstall wget