有人使用 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.
最佳答案
以下是我在运行 Monterey 的 M1 Mac 上安装 ruby-1.8.7 的步骤:
- 使用 Rosetta 启动终端窗口
- 下载并编译 OpenSSL 1.0.2u(假设它安装到/usr/local/ssl)
- 安装HomeBrew并随之安装gcc@6(假设您之前在Arm64架构中没有安装过Home-brew。如果有,则需要先卸载)
- 在终端中运行:
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/