我的电脑是好久没更新过cocoapods,版本为1.5.2,想更新到最新的
1.更新brew:
brew update
2.安装cocoapods:
arch -arm64 brew install cocoapods
3.运行pod install时,还是报错,查看pod版本发现还是1.5.2,找教程发现可能是因为运行路径不一致,找不到新版本,于是将旧pod版本卸载:
sudo rm -rf /usr/local/bin/pod
sudo rm -rf /usr/local/bin/pod ; gem list | grep cocoapods | awk '{print $1}' | while read line; do sudo gem uninstall $line; done
4.再次pod --version,发现是新版本了!激动!!
附mac brew常用命令:
https://www.jianshu.com/p/c60789934af1
网友评论