1

I am trying to install xcode command line tools on OS X El Capitan in order to be able to install homebrew. So far, all the advice I've looked at (e.g. http://railsapps.github.io/xcode-command-line-tools.html, http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/, Command Line Tools not working - OS X El Capitan/ macOS-sierra) are not working. Is there any alternate route anyone can recommend? When I try the recommended trouble shooting from the posts above, I get nonsense errors:

xcode-select: command not found ip-10-4-89-242 ~ $ gcc gcc: fatal error: no input files compilation terminated. ip-10-4-89-242 ~ $ xcode-select --install xcode-select: command not found

Community
  • 1
  • 1
helloB
  • 3,472
  • 10
  • 40
  • 87

1 Answers1

1

It seems likely that xcode-select isn't installed until XCode is installed, considering that it's intended purpose is to link to / switch between already installed versions of XCode tooling.

To solve this, first install XCode from Apple. Then you can connect the command line tools from within the XCode app preferences panel, or via xcode-select in Terminal, as you prefer. Either way, you will be prompted to agree to Apple's XCode terms and conditions.

Once you install XCode and agree to the terms, homebrew will be able to use the XCode command line tools.

Apple provides Xcode for download via the App Store, as well as via their developer site, if you set up an Apple Developer account.

VizJS
  • 11
  • 3
  • 1
    Cannot download Xcode from App Store, because "Xcode can’t be installed on “Macintosh HD” because OS X version 10.12 or later is required." ??? – zok May 17 '17 at 15:53
  • @zok please update the ios from app store and then install xcode – dimyo Dec 05 '17 at 10:42