mac执行git报错

mac执行git相关命令都报错如下:

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

可能原因

  • 升级了mac系统
  • 卸载相关软件

可能因为最近清理mac存储空间卸载了xcode,解决办法:

执行xcode-select --install,弹出安装窗口,并非再次安装xcode,等待约1分钟只安装依赖插件即可。

你可能感兴趣的:(mac执行git报错)