苹果M1最新安装cocoaPods方法
2023-08-21 本文已影响0人
HappyJiuOk
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