这个stackoverflow的答案解决了我的问题:
http://stackoverflow.com/questions/18039029/mac-can-t-install-homebrew
问题如下:
it appears Homebrew is already installed. If your intent is to reinstall you should do the following before running this installer again: rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
解决方案:
rm -rf /usr/local/Cellar /usr/local/.git
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"