rbenv install 3.2.1でerror: failed to download

対応方法

libyaml をインストールして対応

エラー詳細

$ rbenv install 3.2.1
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "C.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
To follow progress, use 'tail -f /tmp/ruby-build.20230322233650.8459.log' or pass --verbose
Downloading ruby-3.2.1.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.1.tar.gz
error: failed to download ruby-3.2.1.tar.gz

BUILD FAILED (Ubuntu 20.04 using ruby-build 20230309)

対応

$ brew install libyaml
...

$ rbenv install 3.2.1
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "C.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
To follow progress, use 'tail -f /tmp/ruby-build.20230322233811.10223.log' or pass --verbose
Downloading ruby-3.2.1.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.1.tar.gz
Installing ruby-3.2.1...

成功しました。

github.com