$ sudo apt install rbenv
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package rbenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'rbenv' has no installation candidate
Ubuntuではもう保守されてないってね..
https://github.com/rbenv/rbenv?tab=readme-ov-file#debian-ubuntu-and-their-derivatives
Gitからインストールしてってね..
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
bash起動時にロードしてね..
$ echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
再起動。やったね
$ rbenv -v
rbenv 1.3.2
ruby-buildも同様に
$ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
installできるruby
$ rbenv install -l