TL;DR
- require libyaml-devel
requirement
dnf install --enablerepo=powertools libyaml-devel
dnf install git
RHEL 9系では別のリポジトリらしい
rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
exec -l $SHELL
check
rbenv -v
rbenv 1.3.0-4-gc335ab8
ruby-build
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
check
rbenv install -l
3.1.6
3.2.5
3.3.5
jruby-9.4.8.0
mruby-3.3.0
picoruby-3.0.0
truffleruby-24.1.0
truffleruby+graalvm-24.1.0
ruby
rbenv install 3.3.5
check
rbenv versions
# 3.3.5
set version
rbenv global 3.3.5
ruby -v
# ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux]
参考