在Mac M1上安装Ruby时检查或清理工作树

91zkwejq  于 2023-06-22  发布在  Ruby
关注(0)|答案(2)|浏览(144)

我试图通过运行rbenv install 2.5.1来安装Ruby 2.5.1,但总是遇到以下错误:

BUILD FAILED (macOS 12.0.1 using ruby-build 20211203)

Inspect or clean up the working tree at /var/folders/_n/7rd4p8r578db_ct2rrwhvwv80000gn/T/ruby-build.20211204124341.35704.JFosKp
Results logged to /var/folders/_n/7rd4p8r578db_ct2rrwhvwv80000gn/T/ruby-build.20211204124341.35704.log

Last 10 log lines:
    rb_mObjSpace = rb_const_get(rb_cObject, rb_intern("ObjectSpace"));
                                            ^~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1755:56: note: expanded from macro 'rb_intern'
        __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \

尝试所有herehere
你知道是什么引起的吗?

vc9ivgsu

vc9ivgsu1#

通过运行$ RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.5.1解决

nbewdwxp

nbewdwxp2#

RUBY_CFLAGS="-Wno-error=implicit-function-declaration”rbenv install 2.5.9其工作正常

相关问题