由于某种原因,我的流浪汉无法解决rubygems.org
。它昨天工作正常,今天我没有做任何改变,现在它已经不再适用了:
vagrant -v # 1.5.3
vagrant init hashicorp/precise64 # ubuntu
vagrant up
vagrant ssh
sudo apt-get update
sudo apt-get install rubygems -y
# here comes the failure...
sudo gem install librarian-puppet
"ERROR: Could not find a valid gem 'librarian-puppet' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
too many redirects (http://www1.dlinksearch.com/?..."
wget rubygems.org
"Resolving rubygems.org (rubygems.org)... ::ffff:67.215.65.145, 54.245.255.174
Connecting to rubygems.org (rubygems.org)|::ffff:67.215.65.145|:80... connected.
HTTP request sent, awaiting response... 303 See Other
Location: http://www1.dlinksearch.com/?url=rubygems%2Eorg [following]
--2014-04-23 02:28:15-- http://www1.dlinksearch.com/?url=rubygems%2Eorg
Resolving www1.dlinksearch.com (www1.dlinksearch.com)... ::ffff:67.215.65.145,
20 redirections exceeded."
wget google.com
Resolving google.com (google.com)... 173.194.126.8, 173.194.126.14, 173.194.126.2, ...
HTTP request sent, awaiting response... 200 OK
2014-04-23 02:36:57 (651 KB/s) - `index.html.2' saved [13872]
wget 54.245.255.174
--2014-04-23 02:44:59-- http://rubygems.org/
Resolving rubygems.org (rubygems.org)... ::ffff:67.215.65.145, 54.245.255.174
HTTP request sent, awaiting response... 200 OK
gem env
- RUBYGEMS VERSION: 1.8.15
- RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
...
- REMOTE SOURCES:
- http://rubygems.org/
答案 0 :(得分:1)
所以从评论来看,显然存在DNS缓存问题,其中" :: ffff:67.215.65.145"回来作为rubygems的有效地址。 " 54.245.255.174"是一个有效的地址,dig @8.8.8.8 ANY rubygems.org
会显示。