CentOS6.9にrbenvでRuby2.5を入れようとして挫折した

まあ、タイトル通りなのですが

rbenvとruby-buildを最新バージョンにした上で

rbenv install --list
rbenv install 2.5.0

と、入れたところ

rbenv install 2.5.0                                             
Downloading ruby-2.5.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0.tar.bz2
Installing ruby-2.5.0...

BUILD FAILED (CentOS release 6.9 (Final) using ruby-build 20171226)

Inspect or clean up the working tree at /tmp/ruby-build.20180108093150.2168
Results logged to /tmp/ruby-build.20180108093150.2168.log

Last 10 log lines:
prelude.c: In function ‘prelude_eval’:
prelude.c:204: error: #pragma GCC diagnostic not allowed inside functions
prelude.c:205: error: #pragma GCC diagnostic not allowed inside functions
prelude.c:221: error: #pragma GCC diagnostic not allowed inside functions
トップレベル:
cc1: 警告: unrecognized command line option "-Wno-self-assign"
cc1: 警告: unrecognized command line option "-Wno-constant-logical-operand"
cc1: 警告: unrecognized command line option "-Wno-parentheses-equality"
cc1: 警告: unrecognized command line option "-Wno-tautological-compare"
make: *** [prelude.o] エラー 1

上記のようなエラーで止まりました。 調べたところ、Issueが出ていて、CentOS6.9とrbenvの組み合わせで発生するエラーらしい 修正されない限り治らないので、とりあえず2.4.3入れて諦めました