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
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
I was not able to get rbenv to work. However, this worked:
λ → rvm install 2.5.0 --with-openssl-dir=/usr/local/opt/openssl/bin/openssl
However, the following did not:
CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl/bin/openssl" rbenv install 2.5.0
Anyone have any idea why? I much prefer to use rbenv :(
How about RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl" rbenv install 2.5.0 ?
@hsbt Thanks for the response. I am appearing to have the same problem.
λ → RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl" rbenv install 2.5.0
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.20180228172754.11067
Results logged to /var/folders/bh/tkwkgbpj7fb9fy52hxwydxr80000gn/T/ruby-build.20180228172754.11067.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
Attached log
ruby-build.log
@sunnyrjuneja Did you install a latest version of openssl via homebrew?
Yes, when I run brew upgrade openssl, I get Error: openssl 1.0.2n already installed.
Unfortunately, I couldn't reproduce your case and help you. I can install Ruby via rbenv install 2.5.0.
Appreciate your attempts @hsbt.
Possibly related: https://github.com/rbenv/ruby-build/issues/1085
@mislav Let me know if you want me to follow up in anyway.
same her with 2.4.0
similar problem here
```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.6 using ruby-build 20180618)
Inspect or clean up the working tree at /var/folders/h9/l8p7sdgj5rdg3csjql432qmm0000gn/T/ruby-build.20180804104650.94044
Results logged to /var/folders/h9/l8p7sdgj5rdg3csjql432qmm0000gn/T/ruby-build.20180804104650.94044.log
Last 10 log lines:
/usr/local/include/Block.h:263:2: error: unknown type name 'lzma_bool'
lzma_bool reserved_bool2;
^
/usr/local/include/Block.h:264:2: error: unknown type name 'lzma_bool'
lzma_bool reserved_bool3;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: * [file.o] Error 1
make: * Waiting for unfinished jobs....```
tried everything here, everything in 1085
Issue is with rbenv. Uninstall it completely & install RVM
On Sat, Aug 4, 2018 at 8:18 PM Dan M notifications@github.com wrote:
similar problem here
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 homebrewBUILD FAILED (OS X 10.13.6 using ruby-build 20180618)
Inspect or clean up the working tree at /var/folders/h9/l8p7sdgj5rdg3csjql432qmm0000gn/T/ruby-build.20180804104650.94044
Results logged to /var/folders/h9/l8p7sdgj5rdg3csjql432qmm0000gn/T/ruby-build.20180804104650.94044.logLast 10 log lines:
/usr/local/include/Block.h:263:2: error: unknown type name 'lzma_bool'
lzma_bool reserved_bool2;
^
/usr/local/include/Block.h:264:2: error: unknown type name 'lzma_bool'
lzma_bool reserved_bool3;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: * [file.o] Error 1
make: * Waiting for unfinished jobs....```tried everything here, everything in 1085
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rbenv/ruby-build/issues/1182#issuecomment-410454650,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHtL5qLQxSfO2xdvs0zZc6uez0t5pzaJks5uNbQ5gaJpZM4SXdRX
.
--
jagtar singhfounder, CEO & Chairman
LinkedIn https://www.linkedin.com/in/jagtarsinghlakhyan/
Twitter https://twitter.com/jagtarslakhyan
web 1: https://www.iitian.xyz/
web 2: https://www.iitians.xyz/
web 3: https://onlineclass.iitians.xyz/
web 4: https://www.iitiansasc.com/
App 1: https://play.google.com/store/apps/details?id=com.zion.iitiansasc
App 2:
https://play.google.com/store/apps/details?id=ar.com.diasporanativewebapp.iitians
LinkedIn https://www.linkedin.com/company-beta/3624953/
Twitter https://twitter.com/IITIANSASC
IITIAN'S ADVANCED SCHOOL OF COMPETITION PVT. LTD.
https://www.facebook.com/IITiansASC/
https://www.iitians.xyz/
https://www.iitiansasc.com/
problem mentioned above had to do with known issues around migration tool.
I am using ansible to automatize my workstation setup,
I am trying to install 2.5.1
failed:[
high_sierra_10_13_4
](item=2.5.1) =>{
"changed":true,
"cmd":[
"rbenv",
"install",
"2.5.1",
"-s"
],
"delta":"3 days, 3:59:06.836027",
"end":"2018-11-10 01:31:08.806138",
"msg":"non-zero return code",
"rbenv_ruby_version":"2.5.1",
"rc":1,
"start":"2018-11-06 21:32:01.970111",
"stderr":"Downloading ruby-2.5.1.tar.bz2...\n-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.bz2\nInstalling ruby-2.5.1...\n\nBUILD FAILED (OS X 10.13.4 using ruby-build 20181019)\n\nInspect or clean up the working tree at /var/folders/g1/sz3lwct14gg77vcvpr5npty40000gn/T/ruby-build.20181106213202.88363\nResults logged to /var/folders/g1/sz3lwct14gg77vcvpr5npty40000gn/T/ruby-build.20181106213202.88363.log\n\nLast 10 log lines:\nchecking for pthread.h... yes\nchecking if make is GNU make... yes\nconftest.c:4:10: fatal error: 'version.h' file not found\n#include \"version.h\"\n ^~~~~~~~~~~\n1 error generated.\n./configure: line 27932: /var/folders/g1/sz3lwct14gg77vcvpr5npty40000gn/T/ruby-build.20181106213202.88363/ruby-2.5.1/tool/ifchange: No such file or directory\n./configure: line 27932: exec: /var/folders/g1/sz3lwct14gg77vcvpr5npty40000gn/T/ruby-build.20181106213202.88363/ruby-2.5.1/tool/ifchange: cannot execute: No such file or directory\nconfigure: error: failed to create .ext/include/x86_64-darwin17/ruby/config.h\nmake: *** No targets specified and no makefile found. Stop.",
"stderr_lines":[
"Downloading ruby-2.5.1.tar.bz2...",
"-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.bz2",
"Installing ruby-2.5.1...",
"",
"BUILD FAILED (OS X 10.13.4 using ruby-build 20181019)",
"",
"Inspect or clean up the working tree at /var/folders/g1/sz3lwct14gg77vcvpr5npty40000gn/T/ruby-build.20181106213202.88363",
"Results logged to /var/folders/g1/sz3lwct14gg77vcvpr5npty40000gn/T/ruby-build.20181106213202.88363.log",
"",
"Last 10 log lines:",
"checking for pthread.h... yes",
"checking if make is GNU make... yes",
"conftest.c:4:10: fatal error: 'version.h' file not found",
"#include \"version.h\"",
" ^~~~~~~~~~~",
"1 error generated.",
"./configure: line 27932: /var/folders/g1/sz3lwct14gg77vcvpr5npty40000gn/T/ruby-build.20181106213202.88363/ruby-2.5.1/tool/ifchange: No such file or directory",
"./configure: line 27932: exec: /var/folders/g1/sz3lwct14gg77vcvpr5npty40000gn/T/ruby-build.20181106213202.88363/ruby-2.5.1/tool/ifchange: cannot execute: No such file or directory",
"configure: error: failed to create .ext/include/x86_64-darwin17/ruby/config.h",
"make: *** No targets specified and no makefile found. Stop."
],
"stdout":"ruby-build: use openssl from homebrew\nruby-build: use readline from homebrew",
"stdout_lines":[
"ruby-build: use openssl from homebrew",
"ruby-build: use readline from homebrew"
]
}
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.
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
--prefix=/Users/myUserName/.rbenv/versions/2.4.2
--with-openssl-dir=/usr/local/opt/openssl
--with-readline-dir=/usr/local/opt/readline
CC=clang
LDFLAGS=-L/Users/myUserName/.rbenv/versions/2.4.2/lib -L/usr/local/opt/[email protected]/lib
CPPFLAGS=-I/Users/myUserName/.rbenv/versions/2.4.2/include -I/usr/local/opt/[email protected]/include
....
generating makefile exts.mk
*** Following extensions failed to configure:
../.././ext/openssl/extconf.rb:0: Failed to configure openssl. It will not be installed.
*** Fix the problems, then remove these directories and try again if you want.
rbenv install 2.4.2 got it fixed by running following commands :
brew reinstall rbenv
brew reinstall openssl
brew reinstall readline
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"
Unfortunately, macOS 10.13 is EOL now.
Most helpful comment
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"