RVM无法安装Ruby

问题描述 投票:1回答:4

我正在尝试通过RVM安装较旧的Ruby版本,但安装失败,出现了我以前从未见过的错误。我已经改变了rvm_max_time_flag但它没有帮助。我能在这做什么?

rvm install 1.9.3p484
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3p484.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/nandersen/.rvm/rubies/ruby-1.9.3p484, this may take a while depending on your cpu(s)...
ruby-1.9.3p484 - #downloading ruby-1.9.3p484, 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
curl: (22) The requested URL returned error: 404 Not Found
The requested url does not exist(22): 'http://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2'
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2
Checking fallback: http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2
No fallback URL could be found, try increasing timeout with:

    echo "export rvm_max_time_flag=20" >> ~/.rvmrc

There has been an error fetching the ruby interpreter. Halting the installation.
ruby-on-rails ruby rvm
4个回答
3
投票

它表示URL不存在或URL没有可供下载的ruby版本。

尝试使用兼容的ruby-gem版本进行安装:

rvm install 1.9.3p484 --rubygems 2.0.9

OR

更新

您确定使用的是RVM的更新版本吗?

rvm get head
rvm install 1.9.3

希望能帮助到你 :)


3
投票

1)确保您使用最新的RVM rvm get head 2)然后安装新的红宝石 rvm install ruby-2.3


1
投票

Solution

rvm list known。如果它没有列出之后的ruby版本,那么仍然可以从本地源安装该版本。某些ruby版本不会被维护,也不会列出,rvm可能会生成错误的URL。

例如,安装ruby-1.9.3-p484是这样的:

首先将ruby存档下载到RVMs档案文件夹中:

cd ~/.rvm/archives; wget http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.bz2

然后使用以下标志安装:

rvm install 1.9.3-p484 --verify-downloads 2 --disable-binary

Explanation

我不得不这样做之后无法做到:rvm install ruby-1.9.3p484

由于上面的命令生成了这个错误:

请求的网址不存在(22):'https://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2'检查后备:https://ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3p484.tar.bz2找不到后备网址,尝试增加超时时间:

echo“export rvm_max_time_flag = 20”>>〜/ .rvmrc

获取ruby解释器时出错。暂停安装。

另见这个答案RVM install ruby from local source


-4
投票

我决定只改变rvm路径的mod

sudo chmod 777 -R /path/to/rvm 

在我的情况下:/ usr / local / rvm

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.