cocoapods安装中遇到的问题

来源:互联网 发布:中国数据分析行业协会 编辑:程序博客网 时间:2024/05/21 18:43

如何下载和安装CocoaPods?

<1>更改下载源
$ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/$ gem sources -l*** CURRENT SOURCES ***https://gems.ruby-china.org
为何要--remove https://rubygems.org因为太慢,使用国内的镜像

<2>安装
sudo gem install cocoapods -V

<3>错误解决

ERROR:  While executing gem ... (OpenSSL::SSL::SSLError)

hostname "upyun.gems.ruby-china.org" does not match the server certificate


执行:gem update --system

ERROR:  While executing gem ... (Errno::EPERM)     Operation not permitted - /usr/bin/xcodeproj

执行:sudo gem install -n /usr/local/bin cocoapods