Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"

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


share|improve this question
Have you installed Xcode command line tools? – Mark Jan 10 '13 at 12:20
@Mark No, I don't have it installed. Homebrew homepage didn't mention it on the homepage and I assumed that it wouldn't need any additional package to work. Just looked up Homebrew wiki and it indeed says that Xcode command line tool is required. Thank you very much! Downloading it right now and will report back after trying it. – vivekagr Jan 10 '13 at 12:40
@Mark Installing Xcode command line tools solved the problem. Thank you again. Though not sure how to mark your comment as the correct answer. – vivekagr Jan 10 '13 at 13:12
up vote 1 down vote accepted

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

share|improve this answer
Thank you, that worked! :) – vivekagr Jan 10 '13 at 13:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.