24

i recently deleted xcode 6 beta 3 and installed xcode 6 beta 6

when i entered gitpush in the terminal this happened

xcrun: error: active developer path ("/Applications/Xcode6-Beta3.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select)

2

5 Answers 5

37

Try pasting this in the terminal:

sudo xcode-select -switch /Applications/Xcode-Beta.app

It will update the path, for the new Xcode name.

Another alternative is just changing the app name back to Xcode, this, of course, considering you don't have the current one installed.

25

Also, to remove dependency from XCode app you can manually install Command line developer tools and use the following command to update developer path:

sudo xcode-select -switch /
4
  • 1
    This helped me a lot as most other solutions I found were dependent on xcode still being on the system. I wanted to do it without xcode
    – Lezz
    Commented Apr 7, 2016 at 21:00
  • 2
    Recent update to El Capitan, never had XCode installed, executing this gave me: xcode-select: error: invalid developer directory '/' Commented Sep 12, 2016 at 9:32
  • 1
    Update: running brew doctor multiple times helped - had to add /usr/local/sbin back to bash profile, had to rerun xcode-select --install. brew pointed out that El Capitan upgrade is known to bork this. :) All working again. Commented Sep 12, 2016 at 9:56
  • This Solution helped me solve my problem for using git without Xcode in the system. Commented Sep 27, 2017 at 7:43
15

Open xcode and navigate to preferences...

enter image description here

Select Location of xcode from command line tools.

enter image description here After that perform command from terminal.

0
8

Even i also faced the same problem after updating my XCode to 6.3

Resolved my problem by Updating Command line tools

$ sudo xcode-select -switch /

1

Just try this in the terminal: sudo xcode-select --reset

Not the answer you're looking for? Browse other questions tagged or ask your own question.