苹果M1最新安装cocoaPods方法

1、Homebrew

/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"

2、Gem

#查看镜像
gem sources -l  
#移除默认
gem sources --remove https://rubygems.org/
#添加新的镜像
gem sources -a https://gems.ruby-china.com/
#更新
sudo gem update --system

3、更新brew

#更新brew
brew update
#更新/安装ruby
brew install ruby
#查看版本
ruby -v  #此时应该是默认2.6版本
#配置环境
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
source ~/.zshrc

4、安装 cocoapods

brew install cocoapods
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容