rbenvでRubyのインストールがエラーになる時の対処方法

rbenvでRubyをインストールしようとした時にエラーが出てインストールできなかったので、対処方法をメモ

発生したエラー

`rbenv install 2.6.4`を実行したところ、以下のエラーが発生してRubyのインストールが上手くいかなかった。

ruby-build: using openssl from homebrew
Downloading ruby-2.6.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.4.tar.bz2
Installing ruby-2.6.4...
ruby-build: using readline from homebrew
BUILD FAILED (OS X 10.14.4 using ruby-build 20190828)
Inspect or clean up the working tree at /var/folders/6_/2499bff93fz0bt4tqsw2m6s80000gn/T/ruby-build.20190922234014.78019
Results logged to /var/folders/6_/2499bff93fz0bt4tqsw2m6s80000gn/T/ruby-build.20190922234014.78019.log
Last 10 log lines:
checking for long long... yes
checking for off_t... yes
checking char bit... 8
checking size of int... 0
checking size of short... 0
checking size of long... 0
checking size of long long... configure: error: in `/var/folders/6_/2499bff93fz0bt4tqsw2m6s80000gn/T/ruby-build.20190922234014.78019/ruby-2.6.4':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

エラーの対処方法

以下の方法で対処できました。

ここから先は

228字

¥ 100

この記事が気に入ったらサポートをしてみませんか?