git - - - - - 报错xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), m

遇到问题

升级了macOS的最新系统以后,本来一直没有任何问题的git出现了下面的报错:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun:
在这里插入图片描述

解决办法:

终端执行如下命令

xcode-select --install

等待安装完成,再在终端执行git命令,git命令就可以正常运行

猜你喜欢

转载自blog.csdn.net/Dark_programmer/article/details/131042845