Mac解决Git错误xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)

今天在升级mac系统后,运行git命令时,报了如下的错误

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

解决方案,在命令行执行

xcode-select --install

回车后,系统弹出下载xcode,点击确认,下载完成后即可。

你可能感兴趣的:(Mac解决Git错误xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools))