美文网首页
解决 cannot run git xcrun: error:

解决 cannot run git xcrun: error:

作者: 中v中 | 来源:发表于2022-08-25 13:15 被阅读0次

由于机器空间不足删除了xcode,打开android studio 时候报git错误“cannot run git xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer”

也是单独安装xcode command tools,不安装xcode的方式

解决方式 :

1.xcode-select --install,后出现错误“xcode-select: error: command line tools are already installed, use "Software Update" to install updates ”,

解决:$ rm -rf /Library/Developer/CommandLineTools

       $ xcode-select --install

2,第二步

1)sudo xcode-select -r
2)sudo xcode-select --switch /Library/Developer/CommandLineTools
3)xcode-select -p(这个命令后会出现我安装的CommandLineTools路径就是看上面操作是否成功)
4)gcc -v(我觉得应该是这个命令起的作用,安装完成后可以先试试这个命令)

相关文章

网友评论

      本文标题:解决 cannot run git xcrun: error:

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