RVM 从本地源安装 ruby [英] RVM install ruby from local source

查看:26
本文介绍了RVM 从本地源安装 ruby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不敢相信这不是更常见的问题.

I can't believe the this isn't a more frequently asked question.

我想安装 ruby​​ 1.9.2,我想将它作为我的 RVM 安装的一部分.1.9.2 的链接在 ruby​​-lang 站点上已经 404'd,所以我从 ruby​​ github 页面复制了 tar.gz,将其重新压缩到 tar.bz2 中,就像 rvm 需要的一样,并将其放入 ~/.rvm/档案

I want to install ruby 1.9.2, and I want it as part of my RVM installation. The link for 1.9.2 has since 404'd on the ruby-lang site, so I copied the tar.gz from the ruby github page, rezipped it into a tar.bz2 like rvm requires and dropped it into ~/.rvm/archives

但是,每次我调用 rvm install 1.9.2-p320 时,它都会从 ~/.rvm/archives 中删除源 tar.bz2 并尝试重新下载 tar.bz2 来自 ruby​​-lang 站点.

However, every time I call rvm install 1.9.2-p320 it deletes the source tar.bz2 from ~/.rvm/archives and tries to redownload the tar.bz2 from the ruby-lang site.

--force--disable-binary 选项不会阻止删除和重新下载尝试.

The --force and --disable-binary options do nothing to prevent the deleting and redownloading attempts.

有没有办法将 rvm 明确指向源 tar.bz2?我想避免自己从源代码编译,然后将目录复制到 rvm 需要它的任何地方.

Is there a way to point rvm explicitly to the source tar.bz2? I'd like to avoid compiling from source myself and then copying the directory into wherever rvm needs it.

注意:看起来 ruby​​-lang ftp 服务器暂时关闭,这解释了为什么下载不断失败,但我的问题仍然存在,因为这对于 rvm 来说似乎是一个很好的功能.

Note: It looks like the ruby-lang ftp server is just down for the moment which explains why the download keeps failing, but my question still stands as this seems like good functionality for rvm to have.

推荐答案

存档的删除由 --verify-downloads 标志控制:

The deletion of archive is controlled with --verify-downloads flag:

rvm install 1.9.2-p320 --verify-downloads 2 --disable-binary

--verify-downloads 标志的值:

  • 0 - 必须有校验和并且必须验证
  • 1 - 不必有校验和,如果可用必须验证
  • 2 - 即使校验和未验证也继续
  • 0 - has to have checksum and must validate
  • 1 - does not have to have checksum, if available must validate
  • 2 - continue even the checksum does not validate

这篇关于RVM 从本地源安装 ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆