I’ve noticed Apple’s frequent updates to OSX Mavericks keep breaking some of my command line setup, particularly developer tools, so here’s a quick tutorial showing you how to install Command Line Tools in OSX 10.9 Mavericks using just the command line.
Background: If you updated to Mavericks from an earlier version of Mac OS X, and you previously installed Xcode Command Line Tools, you’ll need to install the new version of Xcode Command Line Tools as described here. If you previously installed the full Xcode package, you’ll need to update Xcode to the newest version (Xcode 5.01 or newer). After updating Xcode, launch and run the Xcode application and accept the Apple license terms.
1. Open your terminal to get to the command line
2. Type in xcode-select –install ( $ xcode-select –install)
3. Click “Install” on the pop-up modal that asks you if you want to install Xcode developer tools. Agree to terms.
4. Let the installer do its thing (takes about 30 minutes)
5. Happy hacking, you’re done.
Note: if for some reason this install fails (i.e., you receive a message “Can’t install the software because it is not currently available from the Software Update server.”), you can also install Command Line Tools through Xcode itself. To do that, follow these steps:
1. Open up Xcode
2. In the application menu item “Xcode” select Open Developer Tool > More Developer Tools…
3. Download and install “Command Line Tools (OS X Mavericks) for Xcode – Late October 2013”.