I'm getting an error installing ruby 2.6.5
[ruby-build.20191004151402.40644.log](https://github.com/rbenv/ruby-build/files/3692192/ruby-build.20191004151402.40644.log)
➜ ~ rbenv install 2.6.5
ruby-build: using openssl from homebrew
Downloading ruby-2.6.5.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.bz2
Installing ruby-2.6.5...
ruby-build: using readline from homebrew
BUILD FAILED (OS X 10.14.6 using ruby-build 20191004)
Inspect or clean up the working tree at /var/folders/yz/51nhy_gj6xb76r9bzw5qngw00000gn/T/ruby-build.20191004151402.40644
Results logged to /var/folders/yz/51nhy_gj6xb76r9bzw5qngw00000gn/T/ruby-build.20191004151402.40644.log
Last 10 log lines:
ossl_x509req.c:266:5: warning: implicit declaration of function 'X509_REQ_get0_signature' is invalid in C99 [-Wimplicit-function-declaration]
X509_REQ_get0_signature(req, NULL, &alg);
^
7 warnings generated.
1 warning generated.
7 warnings generated.
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
linking shared-object ripper.bundle
make: *** [build-ext] Error 2
I'm also getting an error installing ruby 2.6.4, which had installed successfully on a previous version of ruby-build.
I've got the exact same issue. Up to date MacOS 10.14.6.
Although, it worked using :
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.6.5
@DocEmmetBrown this trick worked for me also. Thanks!
The workaround @DocEmmetBrown gave also works for me. I assume that means that there are still some incompatibilities with [email protected].
@DocEmmetBrown Worked for me too. Thank you!
RUBY_CONFIGURE_OPTS="--with-openssl-dir=brew --prefix openssl --with-readline-dir=brew --prefix readline --with-libyaml-dir=brew --prefix libyaml" rbenv install 2.3.1
I use asdf to install ruby 2.6.5 and this also worked for me thanks @DocEmmetBrown!
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" asdf install ruby 2.6.5
I'm on linux and I used this command to solve the issue
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/lib/ssl" rbenv install 2.6.5
I have what appears could be the same issue, or else a closely related one.
A typical Ruby install has loads of SSL ciphers:
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ciphers].split(':').count
=> 33
... but I just installed a Ruby version with the latest Homebrew versions of both rbenv and ruby-build, which appears to correctly pick up openssl from Homebrew:
--with-openssl-dir=/usr/local/opt/[email protected]
... it even says during the installation:
ruby-build: using openssl from homebrew
... but the Ruby install ends up with no ciphers:
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ciphers]
=> nil
The openssl stdlib itself appears to have been installed correctly:
irb(main):002:0> OpenSSL::SSL::SSLContext::DEFAULT_PARAMS
=> {:min_version=>769, :verify_mode=>1, :verify_hostname=>true, :options=>2147614804}
irb(main):003:0> OpenSSL::OPENSSL_VERSION
=> "OpenSSL 1.1.1d 10 Sep 2019"
irb(main):004:0> OpenSSL::OPENSSL_VERSION_NUMBER
=> 269488207
irb(main):005:0> _
... it's just the :ciphers that are missing altogether.
I've tried all of the above suggestions, but to no avail... I always end up without any SSL ciphers! 😕
Any ideas?
@pvdb the ruby-maintained list of default ciphers are not used for 1.1+: https://github.com/ruby/openssl/pull/66
Did anyone solved it on Ubuntu 19.04? I have both openssl and libssl-dev installed. openssl is in /usr/lib/ssl, but linking it as @sammyhenningsson doesn't help.
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running `apt-get install -y libssl-dev` to fetch missing dependencies.
Configure options used:
--prefix=/home/maciej/.rbenv/versions/2.6.5
--with-openssl-dir=/usr/lib/ssl
--enable-shared
LDFLAGS=-L/home/maciej/.rbenv/versions/2.6.5/lib
CPPFLAGS=-I/home/maciej/.rbenv/versions/2.6.5/include
rbenv: version `2.6.5' is not installed (set by /home/maciej/projekty/iss-e-transform-3/.ruby-version)
Did anyone solved it on Ubuntu 19.04? I have both openssl and libssl-dev installed. openssl is in
/usr/lib/ssl, but linking it as @sammyhenningsson doesn't help.The Ruby openssl extension was not compiled. ERROR: Ruby install aborted due to missing extensions Try running `apt-get install -y libssl-dev` to fetch missing dependencies. Configure options used: --prefix=/home/maciej/.rbenv/versions/2.6.5 --with-openssl-dir=/usr/lib/ssl --enable-shared LDFLAGS=-L/home/maciej/.rbenv/versions/2.6.5/lib CPPFLAGS=-I/home/maciej/.rbenv/versions/2.6.5/include rbenv: version `2.6.5' is not installed (set by /home/maciej/projekty/iss-e-transform-3/.ruby-version)
@ciembor Did you try @DocEmmetBrown 's solution?
@ashwinvidiyala I've managed to compile it, I had to sudo apt purge libssl-dev and then install it again.
@ashwinvidiyala I've managed to compile it, I had to
sudo apt purge libssl-devand then install it again.
@ciembor Yay! Glad you figured it out :)
I had a similar problem trying to install 2.7.1 on Debian 9. openssl was installed but libssl-dev was not. Installing it helped - no flags needed.
In my case with Ruby 2.5.3 that combination worked:
brew uninstall --ignore-dependencies openssl
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
rbenv uninstall 2.5.3
rbenv install 2.5.3
I had a similar problem trying to install 2.7.1 on Debian 9. openssl was installed but libssl-dev was not. Installing it helped - no flags needed.
Same here but on Ubuntu 20.04.1.
I've got the exact same issue. Up to date MacOS 10.14.6.
Although, it worked using :
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.6.5
It didn't work for me on Mac OS Big Sur
I've got the exact same issue. Up to date MacOS 10.14.6.
Although, it worked using :RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.6.5It didn't work for me on Mac OS Big Sur
I've been facing the same issue in a fresh machine and finally today I was able to install 2.2.3 after installing Xcode 11 and setting the Command Line Tools to the 11.x version. For some reason with the curren version of the Command Line Tools (12.x) the build fails.

Most helpful comment
I've got the exact same issue. Up to date MacOS 10.14.6.
Although, it worked using :