I just upgraded from Yosemite to El Capitan (and replicated the problem upgrading from El Capitan to Sierra), and when I try to type for example git status
inside a terminal, I get the following error:
xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun
I don't have Xcode installed, never did. Anyone have a solution?
I upgraded mac os to macOS High Sierra - 10.13.3 and faced a similar issue while trying to install watchman (with command - brew install watchman).
ran the command: xcode-select --install, then ran "brew install watchman" - Everything works fine!
For me, after I've removed Xcode, I have to switch active developer path as follows:
sudo xcode-select -s /
In macOS 10.14 this issue may also occur if you have two or more versions installed. If you like xCode GUI you can do it by going into preferences -
CMD + ,
, selectingLocations
tab and choosing version of Command Line Tools. Please refer to the attached print screen.For Mojave
Uninstall Any old version of Command Line Tools:
Download and Install Command Line Tools 10.14 Mojave.
I tried the solution
xcode-select --install
but it don't help me, I update from Sierra to High and happened this, my solution:I just updated to High Sierra and I couldn't just run
xcode-select --install
. First, I had to actually install xcode from the app store. Then I ranxcode-select --install
. Then I had to runsudo xcodebuild -license
, agree to the terms, then I could finally run git commands again.