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

Noella ·
更新时间:2024-09-21
· 901 次阅读

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  


作者:寂夜了无痕



path active 方法 developer error idea mac Git

需要 登录 后方可回复, 如果你还没有账号请 注册新账号