Ruby fails to build when executing
rbenv install 2.4.1
with the following error
ld: warning: ignoring file libruby-static.a, file was built for archive which is not the architecture being linked (x86_64): libruby-static.a
Undefined symbols for architecture x86_64:
"_ruby_init", referenced from:
_main in main.o
"_ruby_init_stack", referenced from:
_main in main.o
"_ruby_options", referenced from:
_main in main.o
"_ruby_run_node", referenced from:
_main in main.o
"_ruby_sysinit", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
which is obviously a linking error and so probably a problem with ruby-build.
I have managed to solve this issue via ruby-install.
ruby-install --install-dir ~/.rbenv/versions/2.4.1 ruby 2.4.1
wtf is a ruby-install?
Most helpful comment
wtf is a
ruby-install?