Ubuntu下可以通过apt-get install / update
Mac下却不支持apt-get(apt-get是debian下的包管理工具)
问题:想在Mac下安装git(sudo apt-get install git 安装失败,提示apt-get commond not found)
解决:Homebrew
1.安装Homebrew
>>>ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Mac已安装ruby
2.通过Homebrew安装、更新、卸载
>>>brew install xxx
>>>brew uninstall xxx
>>>brew update xxx
3.查看Homebrew下载的package路径
>>>brew --cache
/Users/fengzhi/Library/Caches/Homebrew
>>>ls /Users/fengzhi/Library/Caches/Homebrew
其他关于Homebrew的操作(如upgrade)在此不做过多介绍
Mac下还有其他包管理,例如MacPorts、Fink