mac系統經常使用的軟件安裝工具就是homebrew 我的認爲經過brew安裝比較簡單,下面介紹下如何安裝 node
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ cd `brew --prefix` $ rm -rf Cellar $ brew prune $ rm `git ls-files` $ rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions $ rm -rf .git $ rm -rf ~/Library/Caches/Homebrew
安裝任意包git
$ brew install <packageName>
示例:安裝nodegithub
$ brew install node
卸載任意包ruby
$ brew uninstall <packageName>
示例:卸載gitapp
$ brew uninstall git
查詢可用包curl
$ brew search <packageName>
查看已安裝包列表工具
$ brew list
查看任意包信息url
$ brew info <packageName>
更新Homebrewspa
$ brew update
查看Homebrew版本code
$ brew -v
Homebrew幫助信息
$ brew -h