Git doesn’t work on MacOS Catalina: “xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing” [duplicate]

After upgrading to MacOS X 10.15 Catalina, I cannot run any git commands in my shell:

The default interactive shell is now zsh.

To update your account to use zsh, please run chsh -s /bin/zsh.

For more details, please visit https://support.apple.com/kb/HT208050.

~ | git

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

I thought there’s a problem with my shell, so I followed the instructions to change the default Mac OS shell back to bash, using the GUI and also using the command line:

chsh -s /bin/bash

I also restarted the computer. However, I still see the same message, even though echo "$SHELL" outputs /bin/bash.

1 Answer
1

Leave a Comment