我试图通过运行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))) : \
2条答案
按热度按时间vc9ivgsu1#
通过运行
$ RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.5.1
解决nbewdwxp2#
RUBY_CFLAGS="-Wno-error=implicit-function-declaration”rbenv install 2.5.9其工作正常