Ruby-build: Building Ruby >= 2.4.0 fails on Mac OSX 10.13

Created on 22 Aug 2018  路  2Comments  路  Source: rbenv/ruby-build

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.

Most helpful comment

wtf is a ruby-install?

All 2 comments

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?

Was this page helpful?
0 / 5 - 0 ratings