Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find out the path location to Command Line Tools for Xcode

I didn't want to install the whole Xcode, so I just downloaded the command line tools for Xcode. I am trying to install ruby 1.9.3 via rvm. However, rvm complains that no xcode is selected:

xcode-select: Error: No Xcode is selected. Use xcode-select -switch , or see the xcode-select manpage (man xcode-select) for further information.

I read the xcode-select manpage and I know how to set the path to the Xcode Command Line Tools, but I don't know where they are installed. How do I find this out?

I am using OS X Mountain Lion.

like image 904
Alexander Popov Avatar asked Aug 30 '13 13:08

Alexander Popov


People also ask

How do I find Xcode path on Mac?

Start Xcode on the Mac. Choose Preferences from the Xcode menu. In the General window, click the Locations tab. On the Location window, check that the Command Line Tools option shows the Xcode version (with which the Command Line Tools were installed).


2 Answers

This worked for me: sudo xcode-select --reset

like image 196
user14742503 Avatar answered Sep 20 '22 03:09

user14742503


The entries in /usr/bin are just a front for whatever you choose with xcode-select:

$> /usr/bin/clang --version
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

The standalone command line tools are installed in /Library/Developer/CommandLineTools:

$> sudo xcode-select -s /Library/Developer/CommandLineTools
$> /usr/bin/clang --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin 
like image 31
Matthias Winkelmann Avatar answered Sep 20 '22 03:09

Matthias Winkelmann