发布于 4年前

MacOS升级后使用Git报错:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

MacOS升级到10.15 Catalina后,在命令行执行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

搜索了下,找到的解决方案是,重新安装命令行工具即可。

执行以下命令,完成重新安装命令行工具:

$ xcode-select --install

有些人使用的是重置:

$ xcode-select --reset

大家可以根据都可以尝试下。

©2020 edoou.com   京ICP备16001874号-3