1

I am building Ruby 2.4 from source on OSX (not using a Ruby installer).

However, the resulting Ruby build does not include an openssl.bundle. I assume this is because the system Openssl version on my OSX system is too old (OpenSSL 0.9.8zh 14 Jan 2016).

I have an up to date OpenSSL (1.0.2) installed via homebrew, but for some reason the Ruby build process uses the old system version rather than the homebrew version.

I have tried brew link openssl AND brew link openssl --force but to no avail, every time I get the message:

Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
  -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib

I am unsure what to do at this point. Could someone inform me how I can build Ruby 2.4 from source on OSX to link against my up to date homebrew version of openssl so that I can have an openssl.bundle in the resulting Ruby?

Thanks!

jww
  • 97,681
  • 90
  • 411
  • 885
horseyguy
  • 29,455
  • 20
  • 103
  • 145
  • Also see [Homebrew refusing to link OpenSSL](http://stackoverflow.com/q/38670295), [Update OpenSSL on OS X with Homebrew](http://stackoverflow.com/q/15185661), [How to install latest version of openssl Mac OS X El Capitan](http://stackoverflow.com/q/35129977), [How to upgrade OpenSSL in OS X?](http://apple.stackexchange.com/q/126830), [Openssl installation using HomeBrew fails](http://superuser.com/q/486389), etc. – jww Oct 20 '17 at 02:50
  • @jww thanks, i looked at many of those first but all the solutions i saw seem like horrifying hacks. I was wondering whether there's a canonical way to solve this issue at this point. – horseyguy Oct 20 '17 at 03:14
  • It should be possible to just modify the Makefile and add the compiler flags as brew is suggesting. – Max Oct 20 '17 at 17:15
  • Hi @horseyguy, did you find a solution for your problem? I'm having the same issue atm. – Foo Bar Zoo Dec 30 '18 at 23:13

0 Answers0