【发布时间】:2020-12-31 18:12:45
【问题描述】:
我在 macOS Big Sur 上安装 Ruby 2.2.2 时遇到了一些问题。有没有人遇到过他们能够解决的类似问题?非常感谢????
错误:
`Downloading openssl-1.0.2u.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
Installing openssl-1.0.2u...
Installed openssl-1.0.2u to /Users/findum/.rbenv/versions/2.2.2
Downloading ruby-2.2.2.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2
Installing ruby-2.2.2...
WARNING: ruby-2.2.2 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (macOS 11.1 using ruby-build 20201225)
Inspect or clean up the working tree at /var/folders/x8/g8yqvrh55gq0wds4hny1t94r0000gn/T/ruby-build.20210101111906.42540.uFRvAN
Results logged to /var/folders/x8/g8yqvrh55gq0wds4hny1t94r0000gn/T/ruby-build.20210101111906.42540.log
Last 10 log lines:
compiling ../.././ext/psych/yaml/parser.c
linking shared-object json/ext/parser.bundle
linking shared-object pathname.bundle
installing default psych libraries
linking shared-object json/ext/generator.bundle
linking shared-object bigdecimal.bundle
linking shared-object psych.bundle
linking shared-object nkf.bundle
linking shared-object date_core.bundle
make: *** [build-ext] Error 2`
【问题讨论】:
-
尝试使用此命令安装:
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" rbenv install 2.2.2 -
我建议检查错误消息 /var/folders/x8/g8yqvrh55gq0wds4hny1t94r0000gn/T/ruby-build.20210101111906.42540.log 中提到的日志文件。它可能包含其他有用的信息。
-
查看我的更新答案。我不使用 rbenv 或 ruby-build,所以无法说明它的功效。
-
"警告:ruby-2.2.2 已结束生命周期,现在不受支持。它不再接收错误修复或关键安全更新。" 您是否特别需要Ruby 2.2.2?
-
谢谢@Schwern!是的,我正在重新启动一个旧项目。学习如何升级到新的 Ruby 版本:)