xcode - Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

ID : 236

viewed : 80

Tags : xcodegitmacoscommand-lineterminalxcode

Top 5 Answer for xcode - Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

vote vote

93

The problem is that Xcode Command-line Tools needs to be updated.

Solution #1

Go back to your terminal and enter:

xcode-select --install 

You'll then receive the following output:

xcode-select: note: install requested for command line developer tools 

You will then be prompted in a window to update Xcode Command Line tools. (which may take a while)

Open a new terminal window and your development tools should be returned.

Addition: With any major or semi-major update you'll need to update the command line tools in order to get them functioning properly again. Check Xcode with any update. This goes beyond Mojave...

After that restart your terminal

Alternatively, IF that fails, and it very well might.... you'll get a pop-up box saying "Software not found on server", see below!

Solution #2

and you hit xcode-select --install and it doesn't find the software, log into Apple Developer, and install it via webpage.

Log in or sign up here:

https://developer.apple.com/download/more/

Look for: "Command Line Tools for Xcode 12.x" in the list of downloads Then click the dmg and download.

image of apple developer page and dmg for DL

vote vote

89

I got some errors that the software was unavailable from the update server when trying

xcode-select --install

What fixed it for me was going here https://developer.apple.com/download/more/ and downloading Command Line Tools (macOS 10.14) for Xcode 10 and then installing it manually.

After that, the errors should be gone when you open up a new terminal.

vote vote

76

For me xcode-select --reset was the solution on Mojave.

vote vote

63

In addition to dustbuster's answer I needed to set path to the Xcode folder with this command:

sudo xcode-select -switch /Library/Developer/CommandLineTools 
vote vote

60

updated from Mojave to Big Sur and got the same error : the command

xcode-select --install 

worked like a charm

Top 3 video Explaining xcode - Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

Related QUESTION?