最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Ruby 3.0.6 Fails to Build on macOS 15.1.1 (ARM) Using rbenv & OpenSSL - Stack Overflow

programmeradmin3浏览0评论

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:

  1. Updated Xcode CLI tools
    xcode-select --install
    sudo xcodebuild -runFirstLaunch
    
  2. Checked Homebrew & Dependencies
    brew update && brew upgrade
    brew install readline libyaml gmp openssl@3
    
  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"
    
  4. 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?

发布评论

评论列表(0)

  1. 暂无评论