macOSのパッケージ管理のHomebrewをLinuxに入れる。
こんな形です。
Homebrew -> anyenv -> pyenv/phpenv/rbenv/noenv
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.profile eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install anyenv anyenv install --init $ anyenv install -l Renv crenv denv erlenv exenv goenv hsenv jenv jlenv kubectlenv luaenv nodenv phpenv plenv pyenv rbenv sbtenv scalaenv swiftenv tfenv
echo 'export ANYENV_ROOT="$HOME/.anyenv"' >> .profile echo 'eval "$(anyenv init -)"' >> .profile
$ anyenv install rbenv
sudo apt update sudo apt install build-essential sudo apt install zlib1g-dev libffi-dev libssl-dev
rbenv install 2.6.1 rbenv install 2.7.1 rbenv install 3.2.3 $ rbenv versions 2.6.1 2.7.1 3.2.3
anyenv install phpenv exec $SHELL -l phpenv install -l
anyenv install pyenv exec $SHELL -l pyenv install -l
$ anyenv versions phpenv: 7.3.8 * 8.3.1 (set by /home/ubuntu/.php-version) pyenv: system 2.7.18 * 3.12.1 (set by /home/ubuntu/.python-version) rbenv: 2.6.1 2.7.0 * 3.2.3 (set by /home/ubuntu/.ruby-version)