git使用报错:invalid active developer

2020-03-03  本文已影响0人  chanyi

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 切换路径。即可

上一篇 下一篇

猜你喜欢

热点阅读