Homebrew doesn't find XCode 4.3

6,350

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:
6,350

Related videos on Youtube

BetaRide
Author by

BetaRide

Developer, maker, youtuber. Visit my youtube channel: https://www.youtube.com/channel/UCN8wBEouFtaAyIjjIH2LjJQ

Updated on September 18, 2022

Comments

  • BetaRide
    BetaRide almost 2 years

    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$ 
    
    • HikeMike
      HikeMike over 12 years
      Are the requires files in /Developer/usr/bin? Does it help to change the $PATH?
    • HikeMike
      HikeMike over 12 years
      Does it work when you specify --use-llvm?
    • BetaRide
      BetaRide over 12 years
      --use-llvm did not help, same error message.
    • BetaRide
      BetaRide over 12 years
      There's no /Developer directory.
    • BetaRide
      BetaRide over 12 years
      What could I change in $PATH?
    • BetaRide
      BetaRide over 12 years
      It's installed, I can start it and create new projects.
    • HikeMike
      HikeMike over 12 years
      Where was the Xcode application bundle installed to? What is the output of which cc on the command line? What's the output of echo $PATH? Did you download it from the Apple Developer Connection website or the App Store?
    • BetaRide
      BetaRide over 12 years
      The download is from the App Store.
  • localshred
    localshred over 12 years
    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.
  • Teoulas
    Teoulas over 12 years
    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
  • qxotk
    qxotk about 12 years
    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?
  • Rebecca Scott
    Rebecca Scott about 12 years
    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.