【问题标题】:Error running '__rvm_make -j8' in macos Monterey在 macos Monterey 中运行 \'__rvm_make -j8\' 时出错
【发布时间】:2022-11-17 14:23:08
【问题描述】:

我正在尝试在 MacOS(12.4:apple M2)上使用 RVM 安装 ruby​​ 2.7.0,但出现以下错误并且无法安装所需的 ruby​​ 版本。我已经尝试了互联网上与 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]

【问题讨论】:

  • 您忘记添加错误本身(上面提到的 ...ruby-2.7.1/make.log 文件的尾部)...
  • 更新了错误日志。
  • 你能发布你从 rbenv 得到的错误吗?是同样的错误吗?我在我的 m1 Monterey 上运行 2.7.0,它对我来说工作正常。我已经通过 rbenv 下载了它。
  • 我也为 rbenv 添加了错误日志。
  • 请不要将明文图片发布为they are not appropriate on StackOverflow。请将纯文本复制并粘贴到您的问题中。

标签: ruby macos openssl rvm


【解决方案1】:

在尝试了很多建议之后,按照这些步骤对我有用

  1. MAC 端口安装 https://trac.macports.org/wiki/Migration
  2. 运行 rvm install 2.7.0 --with-out-ext=fiddle

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-08-16
    • 2021-06-28
    • 2018-12-14
    • 1970-01-01
    • 2015-03-06
    • 1970-01-01
    • 1970-01-01
    • 2021-12-11
    相关资源
    最近更新 更多