takezo_jz
@takezo_jz

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

【rbenv】 M1Macにて`rbenv install 3.2.2`実行時に`BUILD FAILED`が出て失敗する【Ruby】【Rails】

解決したいこと

【rbenv】 M1Macにてrbenv install 3.2.2実行時にBUILD FAILEDが出て失敗する【Ruby】【Rails】

例)
Railsの環境開発をしたいです。
解決方法を教えて下さい。
OSはVentura13.5を使用中

発生している問題・エラー

x21024xx@x21024xxnoAir ~ % rbenv install 3.2.2

To follow progress, use 'tail -f /var/folders/mq/x7rmlj0j7s5c3pq1tybgm6n00000gn/T/ruby-build.20230826002544.44088.log' or pass --verbose
Downloading openssl-3.1.1.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674
Installing openssl-3.1.1...
Installed openssl-3.1.1 to /Users/x21024xx/.rbenv/versions/3.2.2

Downloading ruby-3.2.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
Installing ruby-3.2.2...
ruby-build: using readline from homebrew
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew

BUILD FAILED (macOS 13.5 using ruby-build 20230717)

Inspect or clean up the working tree at /var/folders/mq/x7rmlj0j7s5c3pq1tybgm6n00000gn/T/ruby-build.20230826002544.44088.57BWto
Results logged to /var/folders/mq/x7rmlj0j7s5c3pq1tybgm6n00000gn/T/ruby-build.20230826002544.44088.log

Last 10 log lines:
checking for llvm-strip... no
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/var/folders/mq/x7rmlj0j7s5c3pq1tybgm6n00000gn/T/ruby-build.20230826002544.44088.57BWto/ruby-3.2.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

自分で試したこと

Qiitaや検索して出てきたことは試したつもりです、、、

0

1Answer

Your answer might help someone💌