How to solve `invalid active developer path` on macOS Monterey?


I’ve got the following error when I want to use git:

[email protected] ~ % git --version
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

I’ve upgraded my MacBook Pro to macOS Monterey 12.3.1 two days ago:

[email protected] ~ % sw_vers
ProductName:	macOS
ProductVersion:	12.3.1
BuildVersion:	21E258

You have to agree to the window: The "xcode-select" command requires the command line developer tools. Would you like to install the tools now?

How to solve `invalid active developer path` on macOS Monterey?
How to solve `invalid active developer path` on macOS Monterey?

The Install Command Line Developer Toolsis running:

How to solve `invalid active developer path` on macOS Monterey?
How to solve `invalid active developer path` on macOS Monterey?

You have to agree the Licence agreement:

How to solve `invalid active developer path` on macOS Monterey?
How to solve `invalid active developer path` on macOS Monterey?

You will have one first set of Download of the software:

How to solve `invalid active developer path` on macOS Monterey?
How to solve `invalid active developer path` on macOS Monterey?

You will have a second step of installation:

How to solve `invalid active developer path` on macOS Monterey?
How to solve `invalid active developer path` on macOS Monterey?

Depending on the speed of your connection, you can count on 15 to 30 minutes of installation.

Installation completed with the message The software was installed:

How to solve `invalid active developer path` on macOS Monterey?
How to solve `invalid active developer path` on macOS Monterey?

Problem solved, git is working again:

[email protected] ~ % git --version
git version 2.30.1 (Apple Git-130)


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

EN | FR | ES

Search