cocoapods 安装
2018-12-25 本文已影响2人
longMountain
ruby换源
gem sources --remove https://ruby.taobao.org/
gem sources -a https://gems.ruby-china.com
gem source -l
sudo gem install -n /usr/local/bin cocoapods
pod setup 无反应
出现Setting up CocoaPods master repo,半天没有任何反应。原因无他,因为那堵墙阻挡了cocoapods.org。。。
gitcafe和oschina都是国内的服务器,可以用它们CocoaPods索引库的镜像:
$ pod repo remove master
$ pod repo add master https://gitcafe.com/akuandev/Specs.git
$ pod repo update
如果想用oschina的镜像也可以把第二条命令 换成 http://git.oschina.net/akuandev/Specs.git即可
然而呀,,,,我试了好多次结果是:
[!] To setup the master specs repo, please run pod setup.
最后继续查找,找到了如下的,方法:
执行:
git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod repo update