Rbenv + Ruby 2.5.3 + 构建失败(arm64 上的 macOS 14.4.1 使用 ruby-build 20240423)

问题描述 投票:0回答:1

尝试使用

ruby 2.5.3
在 Mac M1 芯片上安装
rbenv
,但无法安装并出现以下错误。

安装过程中失败并显示错误代码

make -j 8
。检查下面的错误日志。

Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
translating probes probes.d
compiling bignum.c
compiling class.c
compiling compar.c
compiling compile.c
compiling complex.c
compiling cont.c
compiling debug.c
class.c:538:13: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
    ID id = rb_intern(name);
            ^~~~~~~~~~~~~~~
./include/ruby/ruby.h:1755:23: note: expanded from macro 'rb_intern'
        __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
                      ^
class.c:538:13: note: '{' token is here
    ID id = rb_intern(name);
            ^~~~~~~~~~~~~~~
./include/ruby/ruby.h:1755:24: note: expanded from macro 'rb_intern'
        __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/ruby/ruby.h:1740:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    {                                                   \
    ^
class.c:538:13: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
    ID id = rb_intern(name);
            ^~~~~~~~~~~~~~~
./include/ruby/ruby.h:1755:24: note: expanded from macro 'rb_intern'
        __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/ruby/ruby.h:1745:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
    }
    ^
class.c:538:13: note: ')' token is here
    ID id = rb_intern(name);

我在这里做错了什么。任何人都可以帮忙解决这个问题,请参阅下图以了解更多详细信息。

enter image description here

ruby-on-rails ruby rubygems rbenv
1个回答
0
投票

rails-console 在屏幕截图中 - 服务器已启动

© www.soinside.com 2019 - 2024. All rights reserved.