MacOS Monterey(M2)下RVM安装Ruby2.7.0遇__rvm_make -j8错误求助
在M2芯片MacOS 12.4上安装Ruby 2.7.0失败求助(RVM/rbenv均报错)
我在搭载M2芯片的MacOS 12.4系统上,尝试通过RVM安装Ruby 2.7.0版本时,出现__rvm_make -j8错误,无法完成安装。试过网上所有OpenSSL相关解决方案,也尝试了rbenv,都没解决。当前OpenSSL版本为1.1.1s(2022年11月1日发布)。
编译过程中的错误日志如下:
+__rvm_make:0> make -j8 BASERUBY = /usr/bin/ruby --disable=gems CC = gcc LD = ld LDSHARED = gcc -dynamiclib CFLAGS = -O3 -ggdb3 -Wno-error=implicit-function-declaration -std=gnu99 -fno-common -pipe XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -DCANONICALIZATION_FOR_MATHN -I. -I.ext/include/-darwin21 -I./include -I. -I./enc/unicode/12.1.0 CPPFLAGS = -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT DLDFLAGS = -Wl,-multiply_defined,suppress -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openssl@1.1/lib -install_name /Users/rashmib/.rvm/rubies/ruby-2.7.0/lib/libruby.2.7.dylib -compatibility_version 2.7 -current_version 2.7.0 -fstack-protector-strong -framework Security -framework Foundation -fstack-protector-strong -framework Security -framework Foundation SOLIBS = -lpthread -ldl -lobjc LANG = LC_ALL = LC_CTYPE = UTF-8 MFLAGS = - --jobserver-fds=4,5 -j Apple clang version 14.0.0 (clang-1400.0.29.202) Target: arm64-apple-darwin21.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin compiling ./main.c compiling dmydln.c compiling miniinit.c compiling dmyext.c translating probes probes.d compiling bignum.c compiling class.c compiling ast.c . ./vm_opts.h compiling compar.c compiling compile.c compiling complex.c compiling cont.c bignum.c:6127:33: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] return rb_num_coerce_bin(x, y, rb_intern("remainder")); ^~~~~~~~~~~~~~~~~~~~~~ ./include/ruby/ruby.h:1847:23: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ bignum.c:6127:33: note: '{' token is here return rb_num_coerce_bin(x, y, rb_intern("remainder")); ^~~~~~~~~~~~~~~~~~~~~~ ./include/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' { \ ^ bignum.c:6127:33: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] return rb_num_coerce_bin(x, y, rb_intern("remainder")); ^~~~~~~~~~~~~~~~~~~~~~ ./include/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE' } ^ bignum.c:6127:33: note: ')' token is here return rb_num_coerce_bin(x, y, rb_intern("remainder")); ^~~~~~~~~~~~~~~~~~~~~~ ./include/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern' __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ ^ class.c:541:13: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
错误截图:
rbenv错误日志截图:
内容的提问来源于stack exchange,提问作者Rashmi Balkur
相关产品推荐
相关产品推荐

