When I try to install something with homebrew I get an error message that it does not find XCode. But I just installed XCode 4.3 and also did a reboot.

admins-MacBook-Pro-2:~ ernst$ brew install macvim
Warning: Xcode is not installed! Builds may fail!
Error: No such file or directory - /usr/bin/cc
admins-MacBook-Pro-2:~ ernst$ 

Any ideas?


admins-MacBook-Pro-2:~ ernst$ which cc
admins-MacBook-Pro-2:~ ernst$ echo $PATH
admins-MacBook-Pro-2:~ ernst$ 
  • Are the requires files in /Developer/usr/bin? Does it help to change the $PATH? – Daniel Beck Feb 16 '12 at 17:25
  • Does it work when you specify --use-llvm? – Daniel Beck Feb 16 '12 at 17:30
  • --use-llvm did not help, same error message. – BetaRide Feb 16 '12 at 17:52
  • There's no /Developer directory. – BetaRide Feb 16 '12 at 17:52
  • What could I change in $PATH? – BetaRide Feb 16 '12 at 17:53

I had the same problem and found the solution in Homebrew's issues page. Open Xcode, open Preferences, select Downloads, and install Command Line Tools. Once it is installed Homebrew should work.

  • Weird cause I was under the impression that you wouldn't need XCode to get those tools but couldn't find them anywhere. Thanks for this answer, been frustrating me. – localshred Feb 22 '12 at 2:40
  • You can download the command-line tools separately from developer.apple.com/downloads (you need an Apple ID). The package requires Lion. For more details: kennethreitz.com/xcode-gcc-and-homebrew.html – Teoulas Mar 12 '12 at 9:15
  • I installed brew and only the command line tools, but brew doctor says I need to run xcode-select to set the path - what do I set it to? – qxotk Jun 16 '12 at 21:46
  • According to my system, xcode-select -print-path == /. So I guess set it to the root path. I recall this was part of the problem, it gets set or used to be set to /Developer when the developer tools were installed to /Developer/usr/bin, which changed in the newer version. YMMV. – Rebecca Scott Jun 19 '12 at 2:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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