I get this error:
xcrun: error: invalid active developer path (/Applications/Xcode.app), missing xcrun at: /Applications/Xcode.app/usr/bin/xcrun
This solution works, but the error occurs again after closing my terminal and reopening it; I then have to run the same commands every time I open a new terminal window.
How can I apply these changes such that they will save after closing the terminal window out?
The problem is that one needs to explicitly agree to the license agreement. As a follow on step, you may need to reset the path to Xcode if you have several versions or want the command line tools to run without Xcode. I found the solution in this question, Command Line Tools not working.
Use xcode-select -switch to choose which version of Xcode you're using by default. On OSX Yosemite use xcode-select --switch path/to/Xcode.
Conclusion. The xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) error is raised when you try to run a git command without having Xcode Tools installed. To fix this error, run xcode-select –install and install Xcode Tools.
xcrun is a tool that helps managing Xcode versions on your system. It allows you to write scripts that don't need to know where your Xcode instance or developer tools are installed. The path to the Xcode version (or developer tools) is set/read via xcode-select . You can reset it via: sudo xcode-select --reset.
I started getting the same error after updating to OS X El Capitan.
In my case, all I did was to install it:
sudo xcode-select --install
And it works fine for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With