I've tried using both Ruby Version Manager (RVM) and RBENV to install 3.0.2 and both times I get some kind of Make error, but can't make heads or tails of the log files. Here is the console log for installing with RVM
~$ rvm install 3.0.2
ruby-3.0.2 - #removing src/ruby-3.0.2..
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/22.10/x86_64/ruby-3.0.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /usr/share/rvm/rubies/ruby-3.0.2, this may take a while depending on your cpu(s)...
ruby-3.0.2 - #downloading ruby-3.0.2, this may take a while depending on your connection...
ruby-3.0.2 - #extracting ruby-3.0.2 to /usr/share/rvm/src/ruby-3.0.2.....
ruby-3.0.2 - #configuring......................................................|
ruby-3.0.2 - #post-configuration..
ruby-3.0.2 - #compiling........................................................|
Error running '__rvm_make -j20',
please read /usr/share/rvm/log/1679415049_ruby-3.0.2/make.log
There has been an error while running make. Halting the installation.
Here is the log file from the above error https://pastebin.com/TdqPS8gm
Here is the console when installing via RBENV
~$ rbenv install 3.0.2
Downloading ruby-3.0.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.gz
Installing ruby-3.0.2...
BUILD FAILED (Ubuntu 22.10 using ruby-build 20220426)
Inspect or clean up the working tree at /tmp/ruby-build.20230321125011.119650.C0ZjOk
Results logged to /tmp/ruby-build.20230321125011.119650.log
Last 10 log lines:
linking shared-object json/ext/generator.so
linking shared-object zlib.so
make[2]: Leaving directory '/tmp/ruby-build.20230321125011.119650.C0ZjOk/ruby-3.0.2/ext/json/generator'
make[2]: Leaving directory '/tmp/ruby-build.20230321125011.119650.C0ZjOk/ruby-3.0.2/ext/zlib'
linking shared-object date_core.so
make[2]: Leaving directory '/tmp/ruby-build.20230321125011.119650.C0ZjOk/ruby-3.0.2/ext/date'
linking shared-object ripper.so
make[2]: Leaving directory '/tmp/ruby-build.20230321125011.119650.C0ZjOk/ruby-3.0.2/ext/ripper'
make[1]: Leaving directory '/tmp/ruby-build.20230321125011.119650.C0ZjOk/ruby-3.0.2'
make: *** [uncommon.mk:300: build-ext] Error 2
Here is the log file from the above error https://pastebin.com/dPe6HhtW