Mac M1 に Ruby をインストールするときに作業ツリーを検査またはクリーンアップする
概要
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))) : \
こことここですべてを試しました。
これの原因は何か考えられますか?
解決策
$ RUBY_CFLAGS=“-Wno-error=implicit-function-declaration” rbenv install 2.5.1を実行することで解決しました。