【问题标题】:How can I install 1.9.3 version of ruby on Mac?如何在 Mac 上安装 1.9.3 版本的 ruby​​?
【发布时间】:2020-11-11 17:24:46
【问题描述】:

我使用rvm install 1.9.3 安装ruby,但出现以下错误。

Xcode version older than 4.6.2 installed, download and install newer version from:

    http://connect.apple.com

After installation open Xcode, go to Downloads and install Command Line Tools.

Error running 'requirements_osx_brew_update_system ruby-1.9.3-p551', please read /Users/.rvm/log/1605112932_ruby-1.9.3-p551/update_system.log Requirements installation failed with status: 1.

我的 Xcode 版本是

/usr/bin/xcodebuild -version
 Xcode 12.1 
Build version 12A7403

所以,我找到了this 并尝试了

rvm install 1.9.3 --with-gcc=clang

但也犯了同样的错误。然后我尝试了

rvm pkg install openssl
CC=/usr/local/bin/gcc-4.2 CPP=/usr/local/bin/cpp-4.2 CXX=/usr/local/bin/g++-4.2  rvm install 1.9.3 --with-openssl-dir=$rvm_path/usr

但是当我使用 rvm pkg install openssl 得到

Error running '__rvm_make install',
please read /Users/.rvm/log/1605114992/openssl_make.install.log

这个文件真的很大,但开头是

[2020-11-11 20:18:55] __rvm_make
__rvm_make () 
{ 
    \make "$@" || return $?
}
current path: /Users/.rvm/src/openssl-1.0.1i
GEM_HOME=/Users/.rvm/gems/ruby-2.0.0-p648
PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/.rvm/gems/ruby-2.0.0-p648/bin:/Users/.rvm/gems/ruby-2.0.0-p648@global/bin:/Users/.rvm/rubies/ruby-2.0.0-p648/bin:/usr/local/bin:/bin:/usr/sbin:/sbin:/Users/.rvm/bin:/usr/bin
GEM_PATH=/Users/.rvm/gems/ruby-2.0.0-p648:/Users/.rvm/gems/ruby-2.0.0-p648@global
command(2): __rvm_make install
+ make install
making all in crypto...
making all in crypto/objects...
make[2]: Nothing to be done for `all'.
making all in crypto/md4...
make[2]: Nothing to be done for `all'.

文件的结尾是

installing man3/err.3
installing man3/evp.3
installing man3/hmac.3
/bin/sh: /Users/.rvm/usr/ssl/man/man3/hmac.3: Too many levels of symbolic links
make: *** [install_docs] Error 1
+ return 2

以及如何解决我找不到的问题。有人可以帮帮我吗?

【问题讨论】:

  • 请阅读 /Users/ashymanovich/.rvm/log/1605114992/openssl_make.install.log 并将其内容粘贴到那里
  • @DNNX 这个文件真的很大,但是我把这个文件的开头和结尾都贴上了。
  • 对于需要 Ruby 1.9.3 的遗留项目,您应该考虑使用虚拟机。

标签: ruby xcode openssl rvm


【解决方案1】:

对 Ruby 1.9.3 的支持于 2015 年 2 月结束,五年半前,它于 2011 年发布,九年前; Ruby 1.9 系列于 13 年前的 2007 年发布。 Ruby 1.9.3 不支持使用 Clang 进行编译,而且它可能也无法使用现代版本的 GCC 进行编译。它也不能与当前版本的 OpenSSL 链接。

通过寻找每一个不可避免的几十个错误来让 Ruby 1.9.3 在当前平台上编译可能会非常乏味。

如果您想编译 旧的软件,最简单的方法是在 实际 测试过的操作系统版本上进行.在您的情况下,这可能是 MacOS X 10.7 “Lion”。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多