Mac OS X 中安裝 brew

不想被誤導?直接看官方文檔:


先安裝Git,打開一個shell

cd /usr/local
sudo mkdir homebrew
curl -L https://github.com/mxcl/homebrew/tarball/master | sudo tar xz --strip 1 -C homebrew
cd homebrew/bin
./brew -v
file brew
cat brew | more
sudo ./brew update

如果“brew update”命令執行出錯,請確保文件夾/usr/local的所有者權限是你本人而不是root:
sudo chown $USER /usr/localbrew updat

在".bash_profile"中更新路徑配置
(如果~下沒有文件".bash_profile" 請執行: touch '.bash_profile' )
vim '.bash_profile'加入
export PATH=$PATH:/usr/local/homebrew/bin
之後可以直接執行brew(不用./brew)

如果有了Git可以這樣安裝(未測試)

git clone https://github.com/mxcl/homebrew.git cd homebrew/bin cd homebrew/bin ./brew -v




安裝測試
./brew install wget

./brew uninstall wget

./brew searc /apache*/
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章