2013-12-23 79 views
0

我無法在Ubuntu上安裝rubygems。無法安裝rubygems - curl:(6)無法解析主機'production.cf.rubygems.org'

以下是日期的日誌。

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

'NSLOOKUP production.cf.rubygems.org 服務器:\t \t 8.8.8.8 地址:\t 8.8.8.8#53 非權威的答案: production.cf.rubygems.org \t規範名稱= d2chzxaqi4y7f8。 cloudfront.net。 名稱:\t d2chzxaqi4y7f8.cloudfront.net 地址:54.230.96.223' –

+0

這是您的DNS問題。 –

回答

0

基於以下錯誤消息:

捲曲:(6)無法解析主機 'production.cf.rubygems.org'

時發生錯誤,(6) 。

該問題可能與網絡或DNS解析有關。發現什麼可能是一個相關的線程 - resolving host有關一個包(不是紅寶石寶石)。最後一行是:

sudo chattr +i /etc/resolv.conf

您可以使用您的cat命令檢查出rsolv.conf。該文件用於配置域名系統解析器庫。您可以在這裏閱讀wiki article bout resolv.conf