ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
原文地址:https://www.zfanw.com/blog/error-while-executing-gem-gem-remote-fetch-error.html
我对命令行下安装 gem 包或是 npm 包有很大的心理阴影,因为出现无法安装的概率实在太大了 – 每次都要破口大骂 gfw。
这一回是在更新 gem 时:
gem update --system
返回的错误如下:
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Operation timed out – connect(2) for “s3.amazonaws.com” port 443 (https://api.rubygems.org/specs.4.8.gz)
出现 s3 的地址是因为此前 https://rubygems.org 源地址不行,所以执行了 gem source 添加源库:
gem source --add https://s3.amazonaws.com/production.s3.rubygems.org/
如你所见,还是报错。
查了资料,不巧 StackOverflow 上这个问题提到了 Proxy,我国的国情,不挂代理简直混不下去 IT 业,所以我的 Mac OSX 的代理环境是这样的:
privoxy(http://localhost:8118) -> sslEdge(http://localhost:100010)全局
Privoxy 我是用来去除一些广告。且把死马当活马医吧:
export http_proxy=http://localhost:8118
export https_proxy=http://localhost:8118
gem update --system
然后目瞪口呆:
Updating rubygems-update
Fetching: rubygems-update-2.4.7.gem (100%)
Successfully installed rubygems-update-2.4.7
Parsing documentation for rubygems-update-2.4.7
Installing ri documentation for rubygems-update-2.4.7
Installing darkfish documentation for rubygems-update-2.4.7
Done installing documentation for rubygems-update after 2 seconds
Installing RubyGems 2.4.7
RubyGems 2.4.7 installed
Parsing documentation for rubygems-2.4.7
Installing ri documentation for rubygems-2.4.7
竟然真是代理的问题。所以我猜想是 iterm2 不支持 socks 代理,因此全局并未生效。而通过 Privoxy 的 HTTP 代理做一次转发,就正常了 – 所以,还是 gfw 的问题。
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)的更多相关文章
- 安装Cocoapods时候ERROR: While executing gem ... (Errno::EPERM)
OS X 10.11 安装Cocoapods 出现问题的解决方法 今天尝试用 Cocoapods安装个第三方库.. 输入pod install, 发现 command not find. WTF! 估 ...
- CocoaPod升级(以及ERROR: While executing gem ... (Errno::EPERM)解决办法)
最近pods 0.39.0 升级1.1.1 ,发现一个坑,好纠结,好歹最后解决了 过程如下: 本来我想直接执行: $ sudo gem install cocoapods // 安装cocoap ...
- cocoods 出现下面的问题:ERROR: While executing gem ... (Errno::EPERM)
今天安装cocoods 出现下面的问题:ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /us ...
- ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
因为突然要用到cocospod,突然发现在使用pod install的时候出现 -bash: pod: command not found 我去-不知道为什么,然后我就想重新安装下cocospod,在 ...
- 【CocoaPods】ERROR: While executing gem ... Gem::DependencyError
今天安装 CocoaPods 时遇到了这个问题. ERROR: While executing gem ... (Gem::DependencyError) Unable to resolve dep ...
- gem install cocoapods ERROR: While executing gem ... (Gem::FilePermissionError)
在cocoapods 执行 sudo gem install cocoapods 的时候出现 While executing gem ... (Gem::FilePermissionError) ...
- warning insecure world writable dir ruby mode 040777,gem insstal sass error failed to build gem native extension
//1.删除原gem源 gem sources --remove https://rubygems.org/ //2.添加国内镜像 gem source -a https://gems.ruby-ch ...
- (原创)vagrant up 异常报错,出现 There was an error while executing `VBoxManage` 的解决方法
最近在使用 vagrant homestead 时,不小心在虚拟机上使用了 exit 命令退出虚拟机,导致再使用 vagrant up 时出现以下错误: Bringing machine 'larav ...
- kafka创建会话,报Error while executing topic command : Replication factor: 1 larger than available brokers: 0.
bin/kafka-topics.sh --create --zookeeper es1:2181 --replication-factor 1 --partitions 1 --topic top ...
随机推荐
- 随机森林学习-sklearn
随机森林的Python实现 (RandomForestClassifier) # -*- coding: utf- -*- """ RandomForestClassif ...
- Python-HTML 最强标签分类
编程: 使用(展示)数据 存储数据 处理数据 前端 1. 前端是做什么的? 2. 我们为什么要学前端? 3. 前端都有哪些内容? 1. HTML 2. CSS 3. JavaScript 4.jQue ...
- C#控制台中创建数据库连接
与数据库的连接主要有以下三种类: sqlconnection:数据库连接类: sqlcommand:数据库操作: sqldatareader:数据库读取: SqlDataReader dr = cmd ...
- Quartz 定时邮件发送多个备份文件
项目代码 pom.xml 文件Quartz 的包是整个项目不可缺少的 <properties> <!-- Spring的版本 --> <springframework.v ...
- python3中的编解码
#一个知识点是:python3中有两种字符串数据类型:str类型和 bytes类型:sty类型存储unicode数据,bytes类型存储bytes数据 #当我们在word上编辑文件的时候,数据保存之前 ...
- iOS学习笔记之触摸事件&UIResponder
iOS学习笔记之触摸事件&UIResponder 触摸事件 与触摸事件相关的四个方法如下: 一根手指或多根手指触摸屏幕 -(void)touchesBegan:(NSSet *)touches ...
- js 事件对象
/* 事件绑定的格式: 元素节点.on + 事件类型 = function(){ } 元素节点 事件类型 on+事件类型:事件处理函数 [注]上述三者一绑定:生成一个新的事件对象. [注]触发事件以后 ...
- Slave SQL_THREAD如何重放Relay log
复制的介绍: 根据日志定义的模式不一样,可以分为:Statement(SBR)模式,Row(RBR)格式或者是MIXED格式,记录最小的单位是一个Event,binlog日志前4个字节是一个magic ...
- 《转》Web Service实践之——开始XFire
Web Service实践之——开始XFire 一.Axis与XFire的比较XFire是与Axis2 并列的新一代WebService平台.之所以并称为新一代,因为它:1.支持一系列Web Serv ...
- bootstrap 列表--水平定义列表
水平定义列表就像内联列表一样,Bootstrap可以给<dl>添加类名“.dl-horizontal”给定义列表实现水平显示效果. @media (min-width: 768px) { ...