helloB
helloB

Reputation: 3582

Install xcode command line tools with OS X El Capitan

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

Upvotes: 1

Views: 6534

Answers (1)

VizJS
VizJS

Reputation: 11

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.

Upvotes: 1

Related Questions