1、pod install后报了如下错:
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: [https://www.ruby-lang.org/bugreport.html](https://links.jianshu.com/go?to=https%3A%2F%2Fwww.ruby-lang.org%2Fbugreport.html)
[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.
解决办法:
1、使用brew安装cocoaPods即可。
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
2、安装cocoapods:
brew install cocoapods
![](https://img.haomeiwen.com/i950427/63185b707035fd82.png)
注意事项:
1、Mac M1芯片环境下安装HomeBrew、RVM
M1安装RVM
https://www.jianshu.com/p/b3aaab3dc55f
如果遇到 SSL certificate problem: certificate has expired 错误
具体内容如下:
Cloning into '/usr/local/Homebrew'...
fatal: unable to access 'https://mirrors.ustc.edu.cn/brew.git/': SSL certificate problem: certificate has expired
m此步骤失败 '尝试再次运行自动脚本选择其他下载源或者切换网络'
[问题分析]:
该部分原因可能因为在此之前 安装过Git客户端 默认Git客户端安装是开启SSL证书验证功能 需要在终端中关闭该验证
[解决办法] :
前面都不是重点,重点是问题描述里面的最后一句 certificate problem: certificate has expired,意思是证书过期了。其实就是SSL卡住了你,因此最快的解决方法就是关掉SSL验证。
2、终端输入下方代码 关闭SSL证书验证:
git config --global http.sslVerify false
3、Mac M1 pod install指令
需要在zsh环境下执行:
arch -x86_64 pod install
参考链接:
M1及以上芯片的项目中cocoapods报错:
https://www.jianshu.com/p/ac0253825307
网友评论