Ruby-build: Ruby 2.6.0 installation fails on MacOS Mojave and Catalina both.

Created on 26 Dec 2019  路  5Comments  路  Source: rbenv/ruby-build

Here's the question on SO with logs pertaining to Mojave. The ones below pertain to MacOS Catalina:

rbenv install 2.6.5
Downloading openssl-1.1.1d.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
Installing openssl-1.1.1d...

BUILD FAILED (OS X 10.15.2 using ruby-build 20191225)

Inspect or clean up the working tree at /var/folders/l_/xgbzwc3j0xn_cb74550m71vr0000gn/T/ruby-build.20191226144551.46445.ELb9GY
Results logged to /var/folders/l_/xgbzwc3j0xn_cb74550m71vr0000gn/T/ruby-build.20191226144551.46445.log

Last 10 log lines:
      _s_server_main in s_server.o
  "_verify_stateless_cookie_callback", referenced from:
      _s_server_main in s_server.o
  "_wait_for_async", referenced from:
      _s_client_main in s_client.o
      _sv_body in s_server.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[1]: *** [apps/openssl] Error 1
make: *** [all] Error 2

Read somewhere that someone has pushed in C++ code on a plain C program somewhere. Don't know how much of that is true.

Most helpful comment

It looks like the issue is with building openssl, try installing openssl as suggested in the wiki:

$ brew install openssl libyaml libffi
$ export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])"
$ rbenv install 2.6.5

Currently, ruby-build doesn't look for homebrew openssl so the above solution might work by explicitly telling it to do so.

All 5 comments

Here's the full error log as gist.

I'm in the same issue here
does anyone knows why??

Downloading openssl-1.1.1d.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
Installing openssl-1.1.1d...

BUILD FAILED (OS X 10.15.2 using ruby-build 20191225)

Inspect or clean up the working tree at /var/folders/y9/stxhby7n39g0jhd_vgj5jnlc0000gn/T/ruby-build.20191229220410.5893.HN5HkQ
Results logged to /var/folders/y9/stxhby7n39g0jhd_vgj5jnlc0000gn/T/ruby-build.20191229220410.5893.log

Last 10 log lines:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h:203:2: error: unknown type name 'uint64_t'
        uint64_t ri_resident_size;
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h:204:2: error: unknown type name 'uint64_t'
        uint64_t ri_phys_footprint;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

I noticed the same issue on another app of mine with ruby 2.5.1 and rails 5.2.0 as well. Has something to do with 32/64 bit machines and the gems that seem to pick the bug up are:

  1. Typhoeus
  2. Bootsnap
  3. Saasc
  4. Ethon.

I posted the issue on stack overflow.

Getting this trying to install 2.7.0 on macOS 10.14.6 (Mojave)...
Same build error, pretty exact build log as well.

It looks like the issue is with building openssl, try installing openssl as suggested in the wiki:

$ brew install openssl libyaml libffi
$ export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix [email protected])"
$ rbenv install 2.6.5

Currently, ruby-build doesn't look for homebrew openssl so the above solution might work by explicitly telling it to do so.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edap picture edap  路  3Comments

snibbets picture snibbets  路  3Comments

tom-mayer picture tom-mayer  路  3Comments

ghost picture ghost  路  4Comments

kriscard picture kriscard  路  5Comments