QuangAnh
QuangAnh

Reputation: 91

BUILD FAILED (macOS 12.1 using ruby-build 20211203 (ruby 3.0.2) macOS Monterey

After upgrading to the latest macOS (Monterey), I was unable to install the new ruby version (3.0.2). Has anyone had a similar issue that they were able to resolve?

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

Downloading ruby-3.0.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.gz
Installing ruby-3.0.2...
ruby-build: using readline from homebrew

BUILD FAILED (macOS 12.1 using ruby-build 20211227)

A few ways that I have tried but it didn't work for me

RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 3.0.2

RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix [email protected]`" rbenv install 3.0.2

If you have any ideas to make this work, please let me know, thanks.

Upvotes: 7

Views: 7175

Answers (1)

Yakup Arslan
Yakup Arslan

Reputation: 191

Same issue here with my new MBP M1 Pro with Monterey v12.1. I was able to run it without problems with below command

RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC arch -arm64 rbenv install 2.7.2

Upvotes: 19

Related Questions