swift - 安装 Cocoapods 报错

标签 swift installation cocoapods

当我尝试安装 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': 找不到 'cocoapods' ( >= 0) 总共 30 个 gem(Gem::LoadError) 来自/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec' 来自/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in gem' 来自/usr/local/bin/pod:22:in'

关于如何修复它的任何想法?提前致谢,对于格式问题深表歉意。

最佳答案

想通了!只需要更新 Ruby 就可以了。感谢这篇文章:How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?

关于swift - 安装 Cocoapods 报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51832201/

相关文章:

ios - SpriteKit : find all descendants of SKNode of certain class?

ios - 如何删除 UITextView Swift 中文本的顶部填充

ios - 在 cocoapod 中使用多个 Assets 目录

ios - 如何去除图像的噪点?

ios - 从 UITableViewCell 中的 UITextField 访问文本

r - 在 Linux Ubuntu 16.10 上安装 Pre-Release R 3.3.2

windows - 编译已安装软件列表时卸载注册表项中的重复条目

android - 无法在 Android 手机上运行 node.js?

xcode - 使用 CocoaPods 混合 Swift3 和 Swift4 pod

ios - 带有 cocoapods 的嵌入式 swift 框架