Installing Homebrew on Mac OSX 10.9 Mavericks

Note: This is a hack. Read the comments, specifically Daniel Dunbar’s, for a better way to do this. Do not use this method anymore.

After installing the developer preview of Mac OSX Mavericks, I started installing my usual list of apps, tools and tweaks. First on the list is always Homebrew, my favorite command line tool. It took a little finessing to get it running, but it works fine, despite the warnings about 10.9 being unsupported.

Before trying to install any packages, I installed the developer preview of Xcode 5 to get the command line tools for compiling. Without the command line tools, you get errors like this trying to install git: git-credential-osxkeychain.c:131: error: ‘protocol’ undeclared (first use in this function)

Unfortunately, it seems that Xcode 5 is doing something different with the command line tools. They are not available for download as they were in Xcode 4.

I also tried using Kenneth Reitz’s wonderful osx-gcc-installer, but Homebrew complained about mismatched compiler versions when using the Mountain Lion installer.

The trick is to download the command line tools from and spoof the OS version as 10.8 so that it can be installed. Simply change two lines in /System/Library/CoreServices/SystemVersion.plist:


You may have to reboot after changing the version. Be sure to change it back to 10.9 after installing the command line tools, otherwise things get quirky.