在升级到最新的MacOS Ventura13.0系统之后,cocopods在install的时候出现了下面的错误

1、我首先使用Failed to extract git version from `git --version去搜索解决方案,大部分都是在终端使用 xcode-select --install的命令解决的,但我们这个无法更新,提示当前版本无法下载
2、我们只能采用第二个方案,去developer apple网站上手工下载对应版本的 Command Line Tools
下载地址:https://developer.apple.com/download/all/?q=xcode

3、下载成功之后直接安装,但仍然还是报错
4、最后我们就就是检查一下xcode是否安装命令行工具。
去Xcode - > Preferenced - > Locations并选择Command Line Tools,查看是否选择了当前xcode版本,就可以了

网友评论