我无法安装 ruby 3.0.3。尝试了许多不同的选择。
rbenv install 3.0.3
Downloading openssl-1.1.1l.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
Installed openssl-1.1.1l to /Users/admin/.rbenv/versions/3.0.3
Downloading ruby-3.0.3.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.tar.gz
Installing ruby-3.0.3...
ruby-build: using readline from homebrew
BUILD FAILED (macOS 12.2.1 using ruby-build 20220125)
Inspect or clean up the working tree at /var/folders/7_/240gy0092fj2gcm9bvzyls480000gp/T/ruby-build.20220214200956.30377.QArDjF
Results logged to /var/folders/7_/240gy0092fj2gcm9bvzyls480000gp/T/ruby-build.20220214200956.30377.log
Last 10 log lines:
/usr/local/include/stdlib.h:361:13: note: insert '_Nonnull' if the pointer should never be null
extern char *suboptarg; /* getsubopt(3) external variable */
^
_Nonnull
219 warnings generated.
安装日志主要由这样的行组成
In file included from /usr/local/include/stdio.h:64:
/usr/local/include/_stdio.h:93:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
unsigned char *_base;
^
/usr/local/include/_stdio.h:93:16: note: insert '_Nullable' if the pointer may be null
unsigned char *_base;
MacOS Monterey 12.2.1,rbenv 1.2.0,ruby-build 20220125。当我在 Big Sur 时也发生了同样的事情(所以我升级了但没有运气)。
brew outdated
什么都不给。我还尝试重新安装gcc
命令行工具并按照brew doctor
.
任何帮助表示赞赏!