pod update报错(Cocoapods: Failed to connect to GitHub to update the CocoaPods/Specs specs repo)报错解决方案
好长一段时间没动pods,今天偶然需要更新一个库,于是执行了下pod update,然后惊悚的出现了这个报错:

[!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
找了一圈资料,尝试了估计不下5种方案,最后解决记录如下:
总结起来就是:
update openssl, then ruby, then cocoapod.
一、升级openssl,先看版本
openssl version
输出:OpenSSL 0.9.8zh 14 Jan 2016
2、输入
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
可能会要你在回车一下,点击回车键

3、更新brew
brew update
ps:如果提示:Error: /usr/local must be writable! 点进去查看解决步骤
4、install openssl
brew install openssl
brew upgrade openssl
5、输入
which openssl
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
再次查看version
which openssl
输出:/usr/local/opt/openssl/bin/openssl
openssl version
输出:OpenSSL 1.0.2n 7 Dec 2017
二、到这里,openssl就更新完成了,下面更新ruby,输入如下:
brew install rbenv ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
查看当前ruby版本:
ruby --version
输出:ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
我们需要更新到最新的版本,先查看最新版本列表
rvm list known
大概如下,能看到一片内容,找到当前最新到2.4.1

输入:
rvm install 2.4
如果报错:Error running 'requirements_osx_brew_update_system ruby-2.4.1,参考:http://www.cnblogs.com/yajunLi/p/8484607.html
更新完,查看版本:
ruby --version
输出:ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
三、最后,更新cocoapods
1、先更新gem
gem install cocoapods -n /usr/local/bin
查看现在到pod版本

四、最后
到这里就结束了,重启项目,新开一个终端窗口,按正常流程走,执行pod update 试试呢
当然,期间也看到一些其他到解决步骤,但很遗憾,没有解决我的问题,更具体,可以参考如下:
pod update报错(Cocoapods: Failed to connect to GitHub to update the CocoaPods/Specs specs repo)报错解决方案的更多相关文章
- Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offli ...
- mac 配置 ssh 到git (Could not resolve hostname github.com, Failed to connect to github.com port 443 Operation timed out)
1.进入终端命令行 (1)输入:cd .ssh/ 进入到.ssh后,输入ls,会输出“known_hosts”,如果没有创建过rsa的话 (2)输入:man ssh-add (3)输入:ssh-key ...
- Failed to connect to github.com port 443: Timed out
Git Clone下载仓库代码的时候,出现以下情况 Failed to connect to github.com port 443: Timed out 解决办法: 输入 git config -- ...
- fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to connect to github.com port 443: Timed out
今天使用git push的时候提示"fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to conne ...
- Linux下安装vim-plug报错:Failed to connect to raw.githubusercontent.com port 443: Connection refused
安装vim-plug时,输入以下命令: curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.c ...
- Jenkins新建项目中源码管理Repository URL使用Git报错:Failed to connect to repository : Command "git ls-remote -h......
之前部署了Gitlab+Gerrit+Jenkins持续集成环境,但在Jenkins中新建项目的源码管理"Repository URL"中添加git地址环节出现了问题,信息为&qu ...
- github FATAL:unable to access 'https://github.com/...: Failed to connect to github.com:443; No error
今天整理github,初次使用,很多都不懂,所以遇到了克隆失败的问题,研究了大半天,后来..... 打开Git Bash,克隆已有工程到本地: $ git clone https://github.c ...
- ansible报错:Failed to connect to the host via ssh: Permission denied
原因: 没有在ansible管理节点(即安装ansible的节点)上添加目标节点(即需要管理的节点)的ssh认证信息. 解决办法: 1.在管理节点生成公钥 ssh-keygen 路径为:~/.ssh/ ...
- xtrabckup备份报错:Failed to connect to MySQL server: Can't connect to local MySQL server through socket '/data/mysql/mysql.sock' (2).
1.做软连接 [root@xxxxxx:/data/backup/log]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock [root@xxxxxxx ...
随机推荐
- HDU 1075 字符串映射(map)
Sample InputSTARTfrom fiwohello difhmars riwosfearth fnnvklike fiiwjENDSTARTdifh, i'm fiwo riwosf.i ...
- Ubuntu安装VirtualBox以及CentOS7.5联网设置
一.virtualBox的安装 官方Liunx版本下载地址: https://www.virtualbox.org/wiki/Linux_Downloads 这里选择下载ubuntu 16.04 ...
- day15--JavaScript语言
JavaScript JavaScript是一门单独的编程语言.浏览器内置JavaScript的解释器. 独立的语言,浏览器具有js解释器. 存在与HTML中,在HTML中写JavaScript,存在 ...
- 2018年商业版idea破解安装介绍
1. IntelliJ IDEA 2018商业版-安装 首先去官网http://www.jetbrains.com/idea/download/#section=windows下载Ultimate版( ...
- 013 Spark中的资源调优
1.平常的资源使用情况 2.官网 3.资源参数调优 cores memory JVM 4.具体参数 可以在--conf参数中给定资源配置相关信息(配置的一般是JVM的一些垃圾回收机制) --drive ...
- [OpenCV-Python] OpenCV 中计算摄影学 部分 IX 对象检测 部分 X
部分 IX计算摄影学 OpenCV-Python 中文教程(搬运)目录 49 图像去噪目标 • 学习使用非局部平均值去噪算法去除图像中的噪音 • 学习函数 cv2.fastNlMeansDenoisi ...
- hdu 1686 Oulipo 【KMP】(计算模式串匹配的次数——与已匹配的字串可以有交集)
题目链接:https://vjudge.net/contest/220679#problem/B 题目大意: 输入一个T,表示有T组测试数据: 每组测试数据包括一个字符串W,T,T长度大于W小于100 ...
- Mybatis Generator xml格式配置
Mybatis Generator可以使用Maven方式和Java方法,使用Maven这里是配置文件: <?xml version="1.0" encoding=" ...
- springboot Autowired BeanNotOfRequiredTypeException
现象 org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'xxxxImpl' is expect ...
- Linux /etc/profile文件详解
Linux /etc/profile文件详解 转载地址:http://linux.chinaitlab.com/administer/820910.html linux /etc/profile文 ...