5
7

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.

M1macでrbenv 2.7.1 installしようとしたときに発生したError

Posted at

環境

mac OS Monterey ver. 12.0.1
rbenv 1.2.0
Homebrew 3.3.7

実行したコマンド

備忘録として残しておく

$ rbenv install 2.7.1

Error

Downloading openssl-1.1.1l.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
Installed openssl-1.1.1l to /Users/kawabataharuki/.rbenv/versions/2.7.1

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

BUILD FAILED (macOS 12.0.1 using ruby-build 20211019)

Inspect or clean up the working tree at /var/folders/fk/j1ynkl3x4_nf_z0x5q_79f600000gn/T/ruby-build.20211210132726.25203.UPZtrh
Results logged to /var/folders/fk/j1ynkl3x4_nf_z0x5q_79f600000gn/T/ruby-build.20211210132726.25203.log

Last 10 log lines:
        imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern'
        __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
                                                       ^
1392 warnings generated.
linking shared-object objspace.bundle
422 warnings generated.
linking shared-object date_core.bundle
make: *** [build-ext] Error 2

実行したコマンド

$ arch -arm64 rbenv install 2.7.1

Error

Downloading openssl-1.1.1l.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
Installed openssl-1.1.1l to /Users/kawabataharuki/.rbenv/versions/2.7.1

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

BUILD FAILED (macOS 12.0.1 using ruby-build 20211203)

Inspect or clean up the working tree at /var/folders/fk/j1ynkl3x4_nf_z0x5q_79f600000gn/T/ruby-build.20211210141535.15027.drzWUT
Results logged to /var/folders/fk/j1ynkl3x4_nf_z0x5q_79f600000gn/T/ruby-build.20211210141535.15027.log

Last 10 log lines:
                                                       ^
compiling ../.././ext/psych/yaml/writer.c
2 warnings generated.
8 warnings generated.
4 warnings generated.
linking shared-object zlib.bundle
linking shared-object psych.bundle
422 warnings generated.
linking shared-object date_core.bundle
make: *** [build-ext] Error 2

実行したコマンド

RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC arch -arm64 rbenv install 2.7.1

成功時

Downloading openssl-1.1.1l.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
Installed openssl-1.1.1l to /Users/kawabataharuki/.rbenv/versions/2.7.1

Downloading ruby-2.7.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.1.tar.bz2
Installing ruby-2.7.1...
ruby-build: using readline from homebrew
Installed ruby-2.7.1 to /Users/kawabataharuki/.rbenv/versions/2.7.1

参考にしたもの

5
7
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
5
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?