系统升级到Mac OS X EI Capitan后,使用命令:sudo gem install cocoapods,安装cocoapods,出现以下错误:
ERROR:Could not find a valid gem 'cocoapods' (>= 0), here is why:Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz)
解决方法:
1. gem sources --remove http://ruby.taobao.org/
2. gem sources -a https://ruby.taobao.org/
再次尝试:sudo gem install cocoapods,出现新的错误:
ERROR:While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
解决方法:
sudo gem install -n /usr/local/bin cocoapods
OK!
使用$pod install时提示
Updating local specs repositories
解决方法:
pod install 被墙了,请大家换成pod install --verbose --no-repo-update