ruby-build: Failing to install 2.5.0 on OSX
Hello there,
I have been trying to run rbenv install 2.5.0
all morning. This is the message I get:
rbenv install 2.5.0
ruby-build: use openssl from homebrew
Downloading ruby-2.5.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0.tar.bz2
Installing ruby-2.5.0...
ruby-build: use readline from homebrew
BUILD FAILED (OS X 10.13.3 using ruby-build 20180224)
Inspect or clean up the working tree at /var/folders/bh/tkwkgbpj7fb9fy52hxwydxr80000gn/T/ruby-build.20180228135045.1996
Results logged to /var/folders/bh/tkwkgbpj7fb9fy52hxwydxr80000gn/T/ruby-build.20180228135045.1996.log
Last 10 log lines:
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
--prefix=/usr/local/opt/rbenv/versions/2.5.0
--with-openssl-dir=/usr/local/opt/openssl
--with-readline-dir=/usr/local/opt/readline
CC=clang
CFLAGS= -O3 -Wno-error=shorten-64-to-32
LDFLAGS=-L/usr/local/opt/rbenv/versions/2.5.0/lib
CPPFLAGS=-I/usr/local/opt/rbenv/versions/2.5.0/include
I have tried
CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install 2.5.0
and
CONFIGURE_OPTS="--with-openssl-dir=/opt/local" rbenv install 2.5.0
I was originally on OS X Sierra but upgraded to High Sierra (hoping it would fix this problem). I have run brew doctor
, brew update
, and brew upgrade
. I have also tried installing and re-installing rbenv. Attached is the log using brew --prefix openssl.
I was able to use 2.4.0 just fine. which openssl
returns /usr/local/opt/openssl/bin/openssl
.
Thank you for your time . ruby-build.log
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 16 (5 by maintainers)
OS X 10.14.3 XCode 10.1 Tried to install ruby 2.4.2 with rbenv. The same issue was with 2.5.0. It is OS issue neither ruby version.
rbenv install 2.4.2 got it fixed by running following commands :
#Added to ~/.zshrc (my shell) export LDFLAGS=“-L/usr/local/opt/openssl/lib” export CPPFLAGS=“-I/usr/local/opt/openssl/include” export PKG_CONFIG_PATH=“/usr/local/opt/readline/lib/pkgconfig” export PATH=“/usr/local/opt/openssl/bin:$PATH” export LDFLAGS=“-L/usr/local/opt/readline/lib” export CPPFLAGS=“-I/usr/local/opt/readline/include” export PKG_CONFIG_PATH=“/usr/local/opt/readline/lib/pkgconfig”
I was not able to get rbenv to work. However, this worked:
However, the following did not:
Anyone have any idea why? I much prefer to use rbenv 😦