mac 上idea 提示 Сannot Run Git xcrun: error: invalid active developer path 解决方法

Mac升级了系统 在idea 中发现Git居然坏了。。。  

完整的错误信息

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


看了下Git命令能否正常使用  命令行git --help 依然报和上面同样的错误

在查找了下git的安装目录 

 whereis git

/usr/bin/git

可以正确输出git安装位置

是不是Git安装包出问题了 在次使用 brew install git 

Error: The following formula:
  git
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
  xcode-select --install

Error: Git must be installed and in your PATH!
Error: The following formula:
  git
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:
  xcode-select --install

这次错误居然给了提示  xcode-select --install

然后使用 xcode-select --install 进行安装 成功解决

控制台使用 git --help命令 看到成功输出内容

解决方法 使用 xcode-select --install 进行安装  安装完成重启idea  

猜你喜欢

转载自blog.csdn.net/a15835774652/article/details/102476008