How to fix brew after OSX upgrade to Yosemite?

I decided to look this up and found thatthere is an issue. The issue is closed but it is not possible to simply runbrew updatebecause you will still get the same error.

So here is what you need to do:

cd /usr/local/Library

git pull origin master

In case you have changes in the directory (/usr/local/Library), the git pull will throw an error. In that case, you'll have to fetch the master branch and set it forcibly as master:

git fetch --all

git reset --hard origin/master

This will upgrade your homebrew and you can use brew again.

If you installed Homebrew as a non-root user, you'll need tocdto/Users/yourusername/homebrew/Libraryinstead of/usr/local/Library.

你可能感兴趣的:(How to fix brew after OSX upgrade to Yosemite?)