安装 Cocoapods 错误
Posted
技术标签:
【中文标题】安装 Cocoapods 错误【英文标题】:Installing Cocoapods Error 【发布时间】:2018-08-14 00:29:39 【问题描述】:当我尝试安装 cocoapods 时,我收到以下错误消息:
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect
returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert
protocol version (https://rubygems.org/latest_specs.4.8.gz)
我以为我已经下载了 cocoapods,但是当我检查版本时使用
pods --version
我明白了:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'cocoapods' (>= 0) among 30 total gem(s) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in
to_spec'
来自 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in gem'
from /usr/local/bin/pod:22:in
'
关于如何解决它的任何想法?在此先感谢并抱歉格式化。
【问题讨论】:
【参考方案1】:想通了!只需要更新 Ruby 就可以了。归功于这篇文章:How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?
【讨论】:
以上是关于安装 Cocoapods 错误的主要内容,如果未能解决你的问题,请参考以下文章
CocoaPods 停止安装 Firebase/Analytics 并出现错误