MacOS – Error while installing Homebrew on Lion

errorhomebrewmacosxcode

I started installing Homebrew on my Mac Lion v10.7.4 but got the following error.

==> Downloading and Installing Homebrew...
Failed during: Error: /usr/bin/xcode-select returned unexpected error. init -q

I ran the following command as mentioned on Homebrew website:

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

I tried to search for solutions for this error but nothing relevant came up. How can this be fixed?

Thanks.

Best Answer

Check that you have the Xcode command line tools installed. See Homebrew installation page.