mac执行git命令出现xcrun: error: invalid active developer path解决方法

运行git clone的时候报错

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

解决方法:

打开终端输入
xcode-select --install
回车

xcode-select: note: install requested for command line developer tools

系统弹出下载xcode,点击安装,下载完成后即可。
(实际上不是下载xcode,可能下载xcode有关插件,下载时长约1分钟)

出现这个错误原因猜想可能是因为之前安装过xcode卸载后出现的。

你可能感兴趣的:(mac执行git命令出现xcrun: error: invalid active developer path解决方法)