学习记录

mac安装brew

安装方法:

No sudo:

sudo chown -R `whoami` /usr/local

#不用每次都执行sudo操作

cd /usr/local

mkdir homebrew && curl -L https://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew

export PATH=/usr/local/homebrew/bin:$PATH

brew -v

查看是否成功,和版本号

brew install git

cd /usr/local/homebrew/Cellar/git/

git init

git remote add origin git://github.com/mxcl/homebrew.git

git pull origin master

用brew安装库及软件方法:

brew install 名称