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 4707 仓鼠 记录深度 (BFS)
题意:linji的仓鼠丢了,他要找回仓鼠,他在房间0放了一块奶酪,按照抓鼠手册所说,这块奶酪可以吸引距离它D的仓鼠,但是仓鼠还是没有出现,现在给出一张关系图,表示各个房间的关系,相邻房间距离为1,而且 ...
- Python Mysql_db对数据查询进行处理
引用自:https://www.cnblogs.com/itdyb/p/5700614.html 一.脚本如下 #!/usr/bin/python2.7# coding=utf-8import tim ...
- js获取、修改url中参数
//获取url的参数 function getParam(paramKey){ //获取当前URL var url = location.href; //获取要取得的get参数位置 var get = ...
- 关于BeanUtils.copyProperties() 用法及区别
这两个类在不同的包下面,而这两个类的copyProperties()方法里面传递的参数赋值是相反的. 例如:a,b为对象BeanUtils.copyProperties(a, b); BeanUtil ...
- 如何在MacBook的以太网端口上成功运行DHCP服务器?
我的目标是在我的MacBook以太网端口上安装一个以太网交换机,我将通过DHCP连接几个Raspberry Pi连接,每个都将运行VNC服务器进行远程访问,我希望我的互联网可以从我的MacBook的W ...
- js数据结构之hash散列的详细实现方法
hash散列中需要确定key和value的唯一确定关系. hash散列便于快速的插入删除和修改,不便于查找最大值等其他操作 以下为字符和数字的hash散列: function HashTable () ...
- ApplicationListener<ContextRefreshedEvent>接口,Spring启动后获取所有拥有特定注解的Bean
最近项目中遇到一个业务场景,就是在Spring容器启动后获取所有的Bean中实现了一个特定接口的对象,第一个想到的是ApplicationContextAware,在setApplicationCon ...
- 洛谷.3391.文艺平衡树(fhq Traep)
题目链接 //注意反转时先分裂r,因为l,r是针对整棵树的排名 #include<cstdio> #include<cctype> #include<algorithm& ...
- 用面向对象计算BMI指数
from __future__ import division class Student: def __init__(self,name,weight,height): self.name=name ...
- c++模板 与 泛型编程基础
C++模板 泛型编程就是以独立于任何特定类型的方式编写代码,而模板是泛型编程的基础. (1)定义函数模板(function template) 函数模板是一个独立于类型的函数,可以产生函数的特定类型版 ...