1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

rbenv install 2.6.7 を実行しエラーが発生した場合の解決方法

Last updated at Posted at 2021-06-05

エラー内容

% rbenv install 2.6.7
Downloading openssl-1.1.1k.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5
Installing openssl-1.1.1k...
Installed openssl-1.1.1k to /Users/Username/.rbenv/versions/2.6.7

Downloading ruby-2.6.7.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.7.tar.bz2
Installing ruby-2.6.7...
ruby-build: using readline from homebrew

BUILD FAILED (macOS 11.2.1 using ruby-build 20210423)

Inspect or clean up the working tree at /var/folders/21/ntlh79kd1yvfz2gwv8n79f4c0000gn/T/ruby-build.20210427115224.72475.T0ZRPY
Results logged to /var/folders/21/ntlh79kd1yvfz2gwv8n79f4c0000gn/T/ruby-build.20210427115224.72475.log

Last 10 log lines:
compiling dmyenc.c
vm.c:2489:34: warning: expression does not compute the number of elements in this array; element type is 'const int', not 'VALUE' (aka 'unsigned long') [-Wsizeof-array-div]
                             sizeof(ec->machine.regs) / sizeof(VALUE));
                                    ~~~~~~~~~~~~~~~~  ^
vm.c:2489:34: note: place parentheses around the 'sizeof(VALUE)' expression to silence this warning
3 warnings and 1 error generated.
make: *** [vm.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
1 warning generated.

解決方法

CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.7 を実行することで解決できます。

引用:https://github.com/rbenv/ruby-build/issues/1747

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?