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 ...
随机推荐
- Oracle 高级排序函数 和 高级分组函数
高级排序函数: [ ROW_NUMBER()| RANK() | DENSE_RANK ] OVER (partition by xx order by xx) 1.row_number() 连续且递 ...
- 【linux】ubuntu下crontab无效解决方法
在Debain的docker中启用crontab,踩了一整天的坑,特地记录一下.Debain和ubuntu差不多,故算在ubuntu下面了. 1.第一个坑,安装crontab apt-get inst ...
- poj2019 二维RMQ模板题
和hdu2888基本上一样的,也是求一个矩阵内的极值 #include<iostream> #include<cstring> #include<cstdio> # ...
- Myeclipse如何使用自带git工具向远程仓库提交代码
先看一下Myeclipse自带的git工具 本人是在码云上面注册的账号,上面有项目的仓库,将仓库的项目克隆到本地之后,在myeclipse中导入该项目. 那么如何将修改后的代码再提交到码云上面? 第 ...
- 向集合中添加Person类型并对其排序
package com.bjpowernode.t03sort; import java.util.ArrayList;import java.util.Collections; /* * 向集合中添 ...
- ORACLE 计算时间相减间隔
在Oralce中我发现有add_months函数,加天数N可以用如下方法实现,select sysdate+N from dual 在Oralce中我发现有add_months函数,加天数N可以用如下 ...
- bootstrap之排版样式
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- JavaScrit全面总结
前端技术的发展变化太快了,各种各样的框架.再变也离不开js.所以,在此把js的高级语法总结一遍. js解析和执行包括:全局和函数 一:全局预处理 <script type="te ...
- HDU 3980 (SG 环变成链 之前的先手变成后手)
题意 两个人在一个由 n 个玻璃珠组成的一个圆环上玩涂色游戏,游戏的规则是: 1.每人一轮,每轮选择一个长度为 m 的连续的.没有涂过色的玻璃珠串涂色 2.不能涂色的那个人输掉游戏 Aekdycoin ...
- [转] Web MVC简介
http://blog.csdn.net/zk_software/article/details/8141843