安装环境:M1芯片、系统:macOS Ventura13.0
安装brew、ruby版本升级等步骤完成后,到了安装cocopods这一步的时候报错:
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
解决方法:
1、brew install openssl@1.1
安装好之后记得看后面的提示配置openssl环境,提示大概是这样子:
2、rvm install 3.0.2 --with-openssl-dir=`brew --prefix openssl@1.1`
3、依次执行ruby -v、rvm use 3.0.2 --default 命令,再执行安装cocopods命令:
sudo gem install -n /usr/local/bin cocoapods