Cocapods安装
2023-04-14 本文已影响0人
IThai
Cocapods安装,大致步骤如下:
1.安装Homebrew (Homebrew是一款Mac OS平台下的软件包管理工具)
1.安装rvm (Ruby Versions Manager)管理ruby版本的命令工具
2.安装ruby
3.安装CocoaPods
安装Homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"






source /user/huhai/.zprofile

安装安装rvm
curl -L get.rvm.io | bash -s stable


登陆 https://www.ipaddress.com.
搜索 “raw.githubusercontent.com”,将搜索结果中展示的Ip地址和域名拷贝系统hosts文件中。保存退出,正常使用。


/etc/hosts



source ~/.rvm/scripts/rvm
rvm -v
安装ruby
rvm list known

rvm install 3.0.0



将刚刚安装的ruby设置为默认版本
rvm use 3.0.0 --default

.更换ruby镜像源
gem sources --remove https://rubygems.org/
gem sources --add https://gems.ruby-china.com
检查ruby源 gem sources -l
安装CocoaPods
sudo gem install -n /usr/local/bin cocoapods
pod --version

pod setup


pod search afn
