카테고리 없음

xcrun: error: invalid active developer path


Spring Datafication 2022. 11. 21. 15:02

This is a common error after updating MacOS.

When this occurs IntelliJ will not be able to detect the current branch. And it might cancel updates to the index.
Or General Git operations will fail.


 fasbhim  ~/Documents/../work/./current/./src/main/java/com/../../control/project  git branch --show-current
 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Causes

It is caused by the fact that the command line tools are not installed. To fix this, run the following command:

xcode-select --install

This will open a dialog box that will allow you to install the command line tools. Once installed, you should be able to run the command again and it should work.

Wait for the download to complete

After the Installation is complete, you can run the command again and it should work.

In the cases where the above command does not work, you can try the following:

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

In case the above does not help

Then it is possible that the command line tools are installed but not linked to the correct path. To fix this, run the following command:

sudo xcode-select -s /Library/Developer/CommandLineTools

Or possible update the path in the .bash_profile file

export PATH="/Library/Developer/CommandLineTools/usr/bin:$PATH"

If Intellij Does not detect the current branch

Then you can try the following:

git config --global core.precomposeunicode false

or reinstall or update Intellij from the JetBrain toolbox.

반응형