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

时间:2022-05-07
本文章向大家介绍mac执行git命令出现xcrun: error: invalid active developer path解决方法,主要内容包括运行git clone的时候报错、解决方法:、基本概念、基础应用、原理机制和需要注意的事项等,并结合实例形式分析了其使用技巧,希望通过本文能帮助到大家理解应用这部分内容。

运行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卸载后出现的。