Git error after upgrading to macOS Sierra - missing xcrun


After updating my OSX from El Capitán to the new version macOS Sierra , I get this error when trying to execute any git command, for example, when executing:

git status

I get the following error:

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

Any idea what I can do about it?

asked by Gepser 13.02.2017 в 05:53

3 answers


You can use xcode-select --install .

An Xcode window will appear, to which you will have to click on Instalar , after that you will have to finish the process and you will be able to use git again.

Original Reply

Original user quadraman of the site in English.

answered by 13.02.2017 / 06:10

The Angel Angel solution is good, but it did not work for me because I got the following message from error:

Basically, what you are saying is that you can not find the software or that it is not available through the server. In that case, what you have to do is install it manually by following these steps:

  • Browse to the Apple developer download page .
  • Sign in with your Apple ID (or the username / password you have for Apple Developer).
  • Download the latest dmg from Command Line Tools for Xcode :
  • Install the dmg (follow the instructions on the screen, this may take a few minutes).
  • Try again.
  • answered by 05.06.2017 в 15:48

    For me none of the previous solutions worked, what I did was restart xcode tools

    xcode-select --reset


    answered by 14.11.2017 в 19:12