The Mac terminal is actually rather useful for those who know how to take advantage of it and more often than not works surprisingly well. However, just like every other piece of software, at times it can throw the occasional bug or glitch.
In this article, we’re taking a look at Xcun error invalid active developer path issue in macOS and how you can get rid of the problem. Several users have been running into this error after an upgrade to macOS which has broken a bunch of Git actions alongside other commands.
The exact error looks like this –
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Reinstall Command Line Tools
The solution to this issue actually is quite straightforward. All you have to do is just install Command Line Tools for Xcode. Even if you have Command Line Tools installed already, try reinstalling them from the terminal using the following command.
If the aforementioned command doesn’t work, try resetting it with sudo access.
sudo xcode-select --reset
Once you’re done, reboot the system and you should be good to go. If you’re using Homebrew, be sure to update that as well.
Manually install Xcode
If you’re still seeing the error in your terminal. It’s time to manually install Command Line Tools by downloading a DMG file straight from Apple.
Head over to the Apple Developer site and download Command Line Tools for Xcode. Once you have, install the file manually. If you’re using Homebrew, try deleting and reinstalling it manually as well. Do keep in mind that you’re going to need an Apple ID to be able to download Command Line Tools from Apple.
Someone who writes/edits/shoots/hosts all things tech and when he’s not, streams himself racing virtual cars. You can reach out to Yadullah at [email protected], or follow him on Instagram or Twitter.