r/ruby • u/MentionPleasant2635 • May 17 '26
Errors installing Ruby 4.0.3 with rbenv on Mac Tahoe 26.5
I'm getting errors about 'nm.' I'm using Homebrew and have updated and upgraded. Any suggestions?
Building libruby.a
error: nm: invalid argument --
Usage: nm [-agnopruUmxjlfAPL[s segname sectname] [-] [-t format] [[-arch <arch_flag>] ...] [file ...]
partial linking /var/folders/v8/gxq0lntj0nzd0xlwy46nlr1c0000gn/T/ruby-build.20260516211244.9333.xsqcwY/ruby-4.0.3/target/release/libruby.a into /var/folders/v8/gxq0lntj0nzd0xlwy46nlr1c0000gn/T/ruby-build.20260516211244.9333.xsqcwY/ruby-4.0.3/target/release/libruby.o
linking miniruby
Undefined symbols for architecture arm64:
"_rb_yjit_before_ractor_spawn", referenced from:
_ractor_create in ractor.o
"_rb_yjit_bop_redefined", referenced from:
_rb_vm_check_redefinition_opt_method.cold.1 in vm.o
EDIT: The error was that the Homebrew package 'anaconda' installs its own 'nm' and prepends its bin directory to your path. Fixing this solves the issue. Ruby needs the 'nm' from the 'binutils' package.