1:解决CocoaPods安装时报的问题,http://ruby.taobao.org/latest_specs.4.8.gz 报404
解决 bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz)
原因:淘宝的那个镜像(https://ruby.taobao.org/ )已经不可用了。所以我们现在用最新支持的ruby镜像(https://gems.ruby-china.org/)
gem sources --remove https://ruby.taobao.org/
gem sources -a https://gems.ruby-china.org/
gem sources -l
sudo gem install -n /usr/local/bin cocoapods
当然如果你是第一次安装时(目前网上有些安装资料可能还指向淘宝的http):
gem sources -l
gem sources --remove https://rubygems.org/
gem sources -a https://gems.ruby-china.org/
gem sources -l
sudo gem install -n /usr/local/bin cocoapods
1.1
$ gem sources -l (用来检查使用替换镜像位置成功)
1.2 报证书错误
$ gem sources -a https://gems.ruby-china.org/
ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR: You must add /C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority to your local trusted store
ERROR: SSL verification error at depth 2: self signed certificate in certificate chain (19)
ERROR: Root certificate is not trusted (/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA)
https://gems.ruby-china.org/ added to sources
解决方式:
$ sudo curl -O http://curl.haxx.se/ca/cacert.pem
$ sudo mv cacert.pem cert.pem
1.3:当pod update时卡在Setting up CocoaPods master repo 就更新一下ruby
淘宝的那个镜像(https://ruby.taobao.org/ )已经不可用了。所以我们现在用最新支持的ruby镜像(https://gems.ruby-china.org/)
需要的命令行:
$ gem sources -r https://rubygems.org/ (移除旧版本的镜像,如果你不知道你电脑上目前用的是什么镜像,可用 $ gem sources -l 来查看)?
$ gem sources -a https://gems.ruby-china.org/ (增加可用的镜像)?
$ gem sources -l (用来检查使用替换镜像位置成功)
2:CocoaPods更新版本后,安装跟更新第三方报错
Update all pods
Re-creating CocoaPods due to major version update.
Updating local specs repositories
Analyzing dependencies
[!] The dependency `ReactiveCocoa (~> 2.5)` is not used in any concrete target.
The dependency `SDWebImage (~> 3.7.5)` is not used in any concrete target.
The dependency `AFNetworking (~> 2.5.4)` is not used in any concrete target.
The dependency `Masonry (~> 0.6.4)` is not used in any concrete target.
The dependency `JSONModel (~> 1.2.0)` is not used in any concrete target.
The dependency `JCAlertView (~> 1.1.5)` is not used in any concrete target.
The dependency `RongCloudIMKit (= 2.5.2)` is not used in any concrete target.
The dependency `SMPageControl (~> 1.2)` is not used in any concrete target.
The dependency `FMDB` is not used in any concrete target.
The dependency `GTSDK` is not used in any concrete target.
The dependency `BaiduMapKit` is not used in any concrete target.
The dependency `UMengAnalytics-NO-IDFA` is not used in any concrete target.
The dependency `Fabric` is not used in any concrete target.
The dependency `Crashlytics` is not used in any concrete target.
The dependency `CocoaLumberjack` is not used in any concrete target.
The dependency `TTTAttributedLabel` is not used in any concrete target.
The dependency `FLEX` is not used in any concrete target.
The dependency `GVUserDefaults` is not used in any concrete target.
The dependency `UMengFeedback (~> 2.3.4)` is not used in any concrete target.
The dependency `TYAttributedLabel (~> 2.5.6)` is not used in any conc