Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Update:

admins-MacBook-Pro-2:~ ernst$ which cc
admins-MacBook-Pro-2:~ ernst$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
admins-MacBook-Pro-2:~ ernst$ 
share|improve this question
    
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

1 Answer 1

up vote 12 down vote accepted

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.

share|improve this answer
    
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? –  jmsmcfrlnd 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. –  Ben Scott Jun 19 '12 at 2:44

Your Answer

 
discard

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.