xcode-select active developer directory error xcode-select active developer directory error xcode xcode

xcode-select active developer directory error


This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode)

Solution:

  1. Install Xcode (get it from https://appstore.com/mac/apple/xcode) if you don't have it yet.
  2. Accept the Terms and Conditions.
  3. Ensure Xcode app is in the /Applications directory (NOT /Users/{user}/Applications).
  4. Point xcode-select to the Xcode app Developer directory using the following command:
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Note: Make sure your Xcode app path is correct.

  • Xcode: /Applications/Xcode.app/Contents/Developer
  • Xcode-beta: /Applications/Xcode-beta.app/Contents/Developer


Other solution for those who don't want to install Xcode:

  1. Install Command Line Tools (if you haven't already):

    xcode-select --install

  2. Change the active directory:

    sudo xcode-select -switch /Library/Developer/CommandLineTools

This worked for me (git).


I was having an issue while trying to install packages using npm.I got the error: "sudo xcode-select -s /Applications//Xcode.app/Contents/Developer/"

To fix this

  • I opened Xcode.
  • Preferences
  • Locations
  • Selected the Command Lin Tools: Xcode 6.1.1

Now when installing packages with npm I no longer get errors.