只需要保证ruby和gem有即可,mac自带的有,可以直接安装cocoapods
1、ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
2、gem -v
3.0.3
3、sudo gem install -n /usr/local/bin cocoapods
Fetching...
32 gems installed
4、pod --version
1.9.3
5、更新cocoapods
sudo gem install cocoapods
注意:更换gem源
gem sources --remove https://rubygems.org/
gem sources --add https://gems.ruby-china.com
网友评论