I updated this Lenovo laptop to Ubuntu 22.04 LTS, installed Ruby (3.1.2), rbenv (1.1.2), then Rails (7.0.3) without issue. However, rbenv consistently crashes when I try to install new ruby executables. Thus far I've tried 2.7.2 (compatible with an old Jekyll blog) and 3.0.2. GCC 11.2.0 is being used for compilation. I've reviewed the ruby-build log but don't yet understand how to proceed.
2.7.2 compilation output shown below. Ideas?
BUILD FAILED (Ubuntu 22.04 using ruby-build 20220426-3-g1038c07)
Inspect or clean up the working tree at /tmp/ruby-build.20220526150603.174696.lPGT5x
Results logged to /tmp/ruby-build.20220526150603.174696.log
Last 10 log lines:
ripper.y: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
linking shared-object ripper.so
make[2]: Leaving directory '/tmp/ruby-build.20220526150603.174696.lPGT5x/ruby-2.7.2/ext/ripper'
linking shared-object date_core.so
make[2]: Leaving directory '/tmp/ruby-build.20220526150603.174696.lPGT5x/ruby-2.7.2/ext/date'
make[1]: Leaving directory '/tmp/ruby-build.20220526150603.174696.lPGT5x/ruby-2.7.2'
make: *** [uncommon.mk:295: build-ext] Error 2```
/tmp/ruby-build.20220526150603.174696.log
to show that we're missing some core dependency. Any useful messages in that file?