简体   繁体   English

在ubuntu 10.10上用rvm安装ruby失败

[英]Installing ruby with rvm fails on ubuntu 10.10

I have been trying to install ruby 1.9.2 using rvm but I'm unable to get it to work.. 我一直在尝试使用rvm安装ruby 1.9.2,但无法正常工作。

I am behind a proxy, but I have configured both http_proxy and https_proxy. 我在代理后面,但是我同时配置了http_proxy和https_proxy。

Output: 输出:

ta@ci:~$ rvm install 1.9.2-p136
Installing Ruby from source to: /home/ta/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...

ruby-1.9.2-p136 - #fetching 
ruby-1.9.2-p136 - #downloading ruby-1.9.2-p136, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
curl: (22) The requested URL returned error: 407
ERROR: The requested url does not exist: 'https://rvm.beginrescueend.com/src/ruby-1.9.2-p136.tar.bz2'
Trying http:// URL instead.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 407
ERROR: There was an error, please check /home/ta/.rvm/log/ruby-1.9.2-p136/*.log
ERROR: There has been an error while trying to fetch the source.  
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.

Eventually I managed to get it to work this way as well. 最终,我也设法使它也以这种方式工作。 Using the .curlrc is also a good idea, but I don't like storing my password as plain text on the machine. 使用.curlrc也是一个好主意,但是我不喜欢将密码以纯文本格式存储在计算机上。

rvm install 1.9.2-p136 --proxy http://username:password@domain:port rvm install 1.9.2-p136 --proxy http://用户名:密码@域:端口

I think you can put these lines in your ~/.curlrc file: 我认为您可以将这些行放在~/.curlrc文件中:

proxy-user = "username:password"
proxy = "http://proxy.domain.com:8080"

I got this from the curl manual page, which can be found online here . 我是从curl手册页上获得的,可以在此处在线找到

Quote: 引用:

.. The config file is a text file in which command line arguments can be written which then will be used as if they were written on the actual command line. ..配置文件是一个文本文件,可以在其中写入命令行参数,然后将其用作实际在命令行上写入的参数。 .. ..

.. Long option names can optionally be given in the config file without the initial double dashes. ..长选项名称可以有选择地在配置文件中给出,而不必带有双引号。 .. ..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM