Git doesn't work on MacOS Catalina: "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing"
76,751
You'll need to reinstall the command line tools:
$ xcode-select --install
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on October 10, 2020Comments
-
Admin over 3 years
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
.-
trojanfoe over 4 yearsWhat has the shell got to do with anything? This looks like an issue with the Xcode command line tools.
-
The Onin over 4 yearsAnswered at apple.stackexchange.com/questions/254380/…
-
-
Admin over 4 yearsIt worked! Also add
export BASH_SILENCE_DEPRECATION_WARNING=1
to your~/.bash_profile
file to get rid of the annoying message. -
idmean over 4 yearsLearn this command by heart. It is almost always the answer to development issues after upgrading macOS.
-
Mendel over 4 years
xcode-select --reset
was the solution for my device. -
David Hladky over 4 yearssudo xcode-select --reset worked. However it additionally required to agree to terms and conditions. The command was: sudo xcodebuild -license
-
vhs over 4 yearsIt may be possible to dodge the license agreement by running
xcodebuild -runFirstLaunch
instead of the provided command. -
ryanpcmcquen over 4 yearsYou can also run
sudo xcodebuild -license accept
to accept it without a prompt. -
The Vojtisek over 4 yearsif it writes
xcode-select command not found
or something like that, just reboot after the OS upgrade and try run thexcode-select --install
again. -
Abhishek Aggarwal about 4 years
sudo xcode-select --reset
worked for me without any hassle. -
Vikram K about 4 years
sudo xcode-select --reset
worked for me. -
Guna almost 4 yearsThe install command said "Can't install the software because it is not currently available from the Software Update server". Any idea how to get pass this?
-
Dragos Stanciu almost 4 years@Guna I manually downloaded and installed the CMD line tools from: developer.apple.com/download/more/?=command%20line%20tools I used the Xcode 12 version.
-
JunaidFarooqui over 3 yearssudo xcode-select --reset works for me.