Skip to content

Instantly share code, notes, and snippets.

@KitaitiMakoto
Last active March 24, 2017 14:36
Show Gist options
  • Save KitaitiMakoto/401b424198f5825a7f5490470d079a2f to your computer and use it in GitHub Desktop.
Save KitaitiMakoto/401b424198f5825a7f5490470d079a2f to your computer and use it in GitHub Desktop.
OS Xでruby-installでRubyを入れる ref: http://qiita.com/KitaitiMakoto/items/677868276a8f7d5a5ce8
% ruby-install ruby-2.3.3
(snip)
Undefined symbols for architecture x86_64:
"_rb_ary_resize", referenced from:
_ary_resize in resize.o
"_rb_cArray", referenced from:
_Init_resize in resize.o
"_rb_define_method", referenced from:
_Init_resize in resize.o
"_rb_num2long", referenced from:
_ary_resize in resize.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../../.ext/x86_64-darwin15/-test-/array/resize.bundle] Error 1
make[1]: *** [ext/-test-/array/resize/all] Error 2
make: *** [build-ext] Error 2
!!! Compiling ruby 2.3.3 failed!
% brew upgrade openssl
% brew info openssl
(snip)
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
(snip)
% cd ~/src/ruby-2.3.3
% make clean
% LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" ./configure --prefix=$HOME/.rubies/ruby-2.3.3
% make
% make install
% chruby
ruby-2.2.3
ruby-2.2.6
ruby-2.3.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment