美文网首页
git使用报错:invalid active developer

git使用报错:invalid active developer

作者: chanyi | 来源:发表于2020-03-03 11:12 被阅读0次

mac电脑卸载了xcode之后,使用git报错:
invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun
问题的原因是:使用git的时候需要CommandLineTools
解决方案有如下两种:
(1)安装CommandLineTools。使用xcode-select --install安装,安装成功即可。
(2)指定路径。使用xcode-select -p查看路径,如果不是/Library/Developer/CommandLineTools,则使用sudo xcode-select --switch /Library/Developer/CommandLineTools 切换路径。即可

相关文章

网友评论

      本文标题:git使用报错:invalid active developer

      本文链接:https://www.haomeiwen.com/subject/anaflhtx.html