我无法在ubuntu上安装rubygems。
以下是termial的日志。
rvm install ruby-1.9.2-p320
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.10/x86_64/ruby-1.9.2-p320.
It is not possible to build movable binaries for rubies 1.8-1.9.2, but you can do it for your system only.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /home/stcadmin/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)...
ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8770k 100 8770k 0 0 96981 0 0:01:32 0:01:32 --:--:-- 220k
ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /home/stcadmin/.rvm/src/ruby-1.9.2-p320.
ruby-1.9.2-p320 - #configuring..........................................
ruby-1.9.2-p320 - #post-configuration.
ruby-1.9.2-p320 - #compiling...................................................................
ruby-1.9.2-p320 - #installing...
ruby-1.9.2-p320 - #making binaries executable.
ruby-1.9.2-p320 - #downloading rubygems-2.1.11
Warning: Transient problem: timeout Will retry in 2 seconds. 3 retries left.
Warning: Transient problem: timeout Will retry in 2 seconds. 2 retries left.
Warning: Transient problem: timeout Will retry in 2 seconds. 1 retries left.
curl: (6) Couldn't resolve host 'production.cf.rubygems.org'
There was an error(6).
Checking fallback: ftp://production.cf.rubygems.org/rubygems/rubygems-2.1.11.tgz
Checking fallback: http://www.mirrorservice.org/sites/production.cf.rubygems.org/rubygems/rubygems-2.1.11.tgz
No fallback URL could be found, try increasing timeout with:
echo "export rvm_max_time_flag=20" >> ~/.rvmrc
There has been an error while trying to fetch rubygems.
Halting the installation.
答案 0 :(得分:0)
基于以下错误消息:
卷曲:(6)无法解析主人'production.cf.rubygems.org'
出现错误(6)。
该问题可能与网络或DNS解析有关。找到可能是相关主题的帖子 - resolving host与包相关(不是ruby gems)。最后一行是:
sudo chattr +i /etc/resolv.conf
您可以使用rsolv.conf
命令查看cat
。该文件用于配置域名系统解析程序库。您可以在此wiki article bout resolv.conf中阅读更多内容。