7

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$ 
9
  • Are the requires files in /Developer/usr/bin? Does it help to change the $PATH?
    – Daniel Beck
    Commented Feb 16, 2012 at 17:25
  • Does it work when you specify --use-llvm?
    – Daniel Beck
    Commented Feb 16, 2012 at 17:30
  • --use-llvm did not help, same error message.
    – BetaRide
    Commented Feb 16, 2012 at 17:52
  • There's no /Developer directory.
    – BetaRide
    Commented Feb 16, 2012 at 17:52
  • What could I change in $PATH?
    – BetaRide
    Commented Feb 16, 2012 at 17:53

1 Answer 1

12

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.

4
  • 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
    Commented Feb 22, 2012 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
    Commented Mar 12, 2012 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
    Commented Jun 16, 2012 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. Commented Jun 19, 2012 at 2:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .