我正在使用chruby进行版本管理,并且正在克隆一个不幸出现在Ruby 1.8.7中的项目。有没有可能用chruby安装Ruby 1.8.7?我在为这个过程寻找资源时遇到了麻烦。
发布于 2014-02-23 00:20:08
TL;DR
你不能,至少不能使用ruby-install。Ruby1.8.7是end-of-life,对它的支持已经被后现代的Ruby安装工具删除了。
不支持Ruby 1.8.7
根据您安装的库和编译器的不同,控制台错误消息可能会有所不同,但未修改的Ruby 1.8.7不太可能在更新的系统上编译。例如,在Ubuntu 13.10上:
$ ruby-install ruby 1.8.7
[lots of output elided]
math.c:37:13: error: missing binary operator before token "("
#elif define(ERANGE)
^
make: *** [math.o] Error 1
!!! Compiling ruby 1.8.7 failed!为什么Ruby 1.8.7不受支持
对Ruby 1.8.7的支持在2013年12月9日被后现代放弃。Commit f013ed2解释:
commit f013ed2476ecce82ea41ff63de413daf2231b82b
Author: Postmodern <postmodern.mod3@gmail.com>
Date: Mon Dec 9 16:09:30 2013 -0800
Drop support for Ruby 1.8.x since it has reached End-of-Life.
* CVE-2013-4164 affects Ruby 1.8.x and there is no official patch.
Enabling users to install and run 1.8.x at this point is irresponsible.替代方案
您的替代方案包括:
将Ruby1.8.6-P420和1.8.7-p374.
发布于 2014-02-23 09:11:52
我们确实删除了version 0.4.0中的所有变通补丁和1.8.x特定代码。然而,如果你是在一个老系统上安装ruby 1.8.7 (使用老版本的GCC,openssl等),它应该仍然可以编译。1.8.7 不能在具有较新版本的GCC、openssl等的较新系统上进行编译。如果你真的需要安装1.8.7,你可以尝试应用带有--patch选项的RVM's 1.8.7 patches;尽管运行大量打补丁的ruby是有风险的。此外,RedHat和Debian仍在为他们的企业用户维护ruby1.8.7包。
发布于 2014-11-15 19:47:40
https://stackoverflow.com/questions/21891402
复制相似问题