I'm trying to install Ruby 3.0.6 using rbenv
on macOS 15.1.1 (ARM) with OpenSSL 3, but the build keeps failing.
I ran:
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/homebrew/opt/openssl@3" rbenv install 3.0.6
But it fails with multiple errors, including:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
compiling new.c
installing default bigdecimal libraries
20 errors generated.
make[2]: *** [bigdecimal.o] Error 1
make[1]: *** [ext/bigdecimal/all] Error 2
make: *** [build-ext] Error 2
external command failed with status 2
I also see warnings about duplicate libraries:
ld: warning: ignoring duplicate libraries: '-lruby.3.0'
What I've Tried:
- Updated Xcode CLI tools
xcode-select --install sudo xcodebuild -runFirstLaunch
- Checked Homebrew & Dependencies
brew update && brew upgrade brew install readline libyaml gmp openssl@3
- Set Compiler Flags Before Building
export RUBY_CFLAGS="-Wno-error=implicit-function-declaration -Wno-error=deprecated-non-prototype" export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib" export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include" export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
- Manually Cleaned & Reinstalled Ruby
rbenv uninstall 3.0.6 rm -rf ~/.rbenv/versions/3.0.6 rm -rf /var/folders/*/*/*/ruby-build* rbenv install 3.0.6
System Info:
- macOS: 15.1.1 (ARM)
- Ruby Version: Trying to install 3.0.6
- rbenv Version: Latest
- Homebrew OpenSSL Version: 3.4.1
What else can I try to get this working?