ruby - 在 Monterey 12.0.1 上安装 RVM 1.8.7 失败

标签 ruby rvm ruby-on-rails-2 ruby-1.8.7

有人使用 RVM 在 Monterey 上安装了 ruby​​ 1.8.7 吗?

我已经尝试了那里报告的所有解决方案,但似乎没有一个对我有用。我知道 1.8.7 已完全弃用且不受支持,但此版本仍有许多可用。

RVM版本:rvm 1.29.12(最新) gem 版本:3.2.3

我尝试的最后一个是:

$ export warnflags=-Wno-error=implicit-function-declaration
$ rvm install ruby-1.8.7 --with-openssl-dir=$HOME/.rvm/usr

Warning! Requested ruby installation which requires another ruby available - installing ruby-1.8.7-p374 first.

ruby-1.8.7-p374 - #removing src/ruby-1.8.7-p374..
Checking requirements for osx.
Installing requirements for osx.
Updating system..........
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl................
Certificates bundle '/usr/local/etc/openssl@3/cert.pem' is already up to date.
Requirements installation successful.
Warning: DYLD_LIBRARY_PATH environment variable is set, this might interact with the compilation and ruby.
Installing Ruby from source to: /Users/myuser/.rvm/rubies/ruby-1.8.7-p374, this may take a while depending on your cpu(s)...
ruby-1.8.7-p374 - #downloading ruby-1.8.7-p374, this may take a while depending on your connection...
ruby-1.8.7-p374 - #extracting ruby-1.8.7-p374 to /Users/myuser/.rvm/src/ruby-1.8.7-p374.....
ruby-1.8.7-p374 - #applying patch /Users/myuser/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch.
ruby-1.8.7-p374 - #applying patch /Users/myuser/.rvm/patches/ruby/1.8.7/no_sslv2.diff.
ruby-1.8.7-p374 - #applying patch /Users/myuser/.rvm/patches/ruby/GH-488.patch.
ruby-1.8.7-p374 - #applying patch /Users/myuser/.rvm/patches/ruby/ssl_no_ec2m.patch.
ruby-1.8.7-p374 - #configuring...............................
ruby-1.8.7-p374 - #post-configuration.
ruby-1.8.7-p374 - #compiling.................................
Error running '__rvm_make -j12',
please read /Users/myuser/.rvm/log/1638292263_ruby-1.8.7-p374/make.log

There has been an error while running make. Halting the installation.

To proceed rvm requires a ruby-1.8.7-p374 compatible ruby is installed.
We attempted to install it automatically but it failed with status 2.
Please install it manually (or a compatible alternative) to proceed.

Link to make.log

最佳答案

以下是我在运行 Monterey 的 M1 Mac 上安装 ruby​​-1.8.7 的步骤:

  1. 使用 Rosetta 启动终端窗口
  2. 下载并编译 OpenSSL 1.0.2u(假设它安装到/usr/local/ssl)
  3. 安装HomeBrew并随之安装gcc@6(假设您之前在Arm64架构中没有安装过Home-brew。如果有,则需要先卸载)
  4. 在终端中运行: rvm install 1.8.7 --with-openssl-dir=/usr/local/ssl --autolibs=disable --with-gcc=gcc-6

关于ruby - 在 Monterey 12.0.1 上安装 RVM 1.8.7 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70173447/

相关文章:

ruby-on-rails - 使用可选参数进行路由

ruby - 在 Ruby 数组中选择 "least congested"数字

ruby - Zlib 在新的 ubuntu server/rvm/gemset 中不断引起问题

ruby-on-rails - 卸载 rails 和 gems,得到错误 "cannot uninstall, check ' gem list -d ...'

namespaces - 没有要加载的文件——redis-namespace

ruby-on-rails - 为未命名为 ":id"的数据库设置主键

c - 如何在 Linux 中使用 GCC 编译一个简单的源文件

ruby - 获取公共(public)(远程)IP 地址

ruby - 将时间序列值的 Ruby 数组映射到加权间隔

ruby - 无法在 OSX 上使用 RVM 运行 Ruby 2.2.3