某些项跑arch -x86_64命令,现阶段不跑x86_64模式无法顺利使用
在不用arch -x86_64的情况下,先把gem和rvm正常配置好
安装Homebrew
正常安装
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
国内安装
arch -x86_64 /bin/bash -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
安装Ruby
查找列表
rvm list known
找到最新,这时候我找到的是3.0.0最新
arch -x86_64 rvm install 3.0.0
然后
rvm use 3.0.0
安装ffi
可能要安装一个gem的ffi插件,要不可能报一个cocoapods使用的错
sudo arch -x86_64 gem install ffi
安装Cocoapods
sudo arch -x86_64 gem install -n /usr/local/bin cocoapods
如果出现警告
/Users/xmly/.rvm/gems/ruby-2.7.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete
执行
export RUBYOPT=-W0
. ~/.zshrc
[!] CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/5/5/2/Colendar/1.0.3/Colendar.podspec.json Response: Timeout was reached
pod repo remove trunk