20
votes

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)

4
The message would suggest you should do something like xcode-select --switch /Applications/Xcode6-Beta6.app. Have you tried that? - John Flatness
If you just upgraded to mojave and got this, see apple.stackexchange.com/questions/254380/… - rogerdpack

4 Answers

36
votes

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.

22
votes

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 /
14
votes

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.

7
votes

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 /