您的位置:首页 > 其它

Mac OS X 中安装 brew

2013-09-21 22:39 225 查看
不想被误导?直接看官方文档:

http://mxcl.github.com/homebrew/ 

先安装Git,打开一个shell


cd /usr/localsudo mkdir homebrewcurl -L https://github.com/mxcl/homebrew/tarball/master | sudo tar xz --strip 1 -C homebrewcd homebrew/bin./brew -vfile brewcat brew | moresudo ./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*/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: