If you have a Mac and use the Terminal, you may have seen an error message stating “xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)“. Here’s how to fix it. Sometimes these command-line tools stop working after a macOS system software update, but they worked previously.

Luckily, there’s an easy way to fix the xcrun error message and get your command line tools back up and running.

For the record, the full error message is:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Fix “xcrun: error: invalid active developer path” Error in Terminal on MacOS

The solution to this problem is to reinstall or install the command line tools. Yes, even if you already have command line tools installed, it is a good idea to reinstall them to possibly fix the error message. This may be necessary after upgrading your device’s system software.

1. Installing CLT can be done from the Terminal by issuing the following command string:

xcode-select --install

2. Hit return for a progress indicator on the Command Line Tools download.

3. After installation of the Command Line Tools has been completed, your Mac should be rebooted. If you’re getting “xcrun error invalid active developer path” while working in Terminal, refresh the application or relaunch it.

NOTE: If you are using Homebrew, try updating it after re-installing Command Line tools.

How to Install Homebrew on Mac

Still seeing xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)?

Even after following the above-mentioned steps, if you see the error: invalid active developer path (/Library/Developer/CommandLineTools). The next step would be to try and install Command Line Tools using a DMG file that can be downloaded directly from the Apple website.

Again, if you are using Homebrew, you need to update it. You don’t need to uninstall and again install Homebrew on Mac.

Conclusion: Git not working after macOS Update

I hope you were able to fix Git not working after macOS Update Error. If you face any issues, please comment below. If there is any other alternative solution, please do share that in the comments.

Author

Ruby has been a writer and author for a while, and her content appears all across the tech world, from within ReadWrite, BusinessMagazine, ThriveGlobal, etc.

Write A Comment