关于iOS版本更新导致的 (RuntimeError)CocoaPods失效问题解决

391 阅读1分钟

报错:

Failed to extract git version from git --version ("xcrun:error:invalid active developer path (/Library/Developer/CommandLineTools )missing xcrun at:/Library/Developer/CommandLineTools/usr/bin/xcrun\\n")(RuntimeError)

截屏2021-12-18 下午5.51.38.png

解决方法(针对版本更新问题)

1.重装

(可能需要花费少量时间,但是如果发现预计时间过长(显示长达95小时)可以先取消安装,随后再次安装,预计时间就会变得合理)

xcode-select --install

2.切换路径

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

3.检验是否安装

pod -v

4.成功安装

截屏2021-12-18 下午5.52.29.png