ruby-build: Ruby 2.4.1 build failed on macOS High Sierra 10.13.2
Struggling with getting rbenv up and running on my mac:
macOS 10.13.2 rbenv 1.1.1 OpenSSL 1.1.0g 2 Nov 2017 (tried different without specifying 1.1 as well) curl 7.57.0
% which rbenv
/usr/local/bin/rbenv
% which openssl
/usr/local/opt/openssl@1.1/bin/openssl
% which curl
/usr/local/opt/curl/bin/curl
rbenv, curl, openssl - all in PATH
% rbenv install 2.4.1
ruby-build: use openssl from homebrew
Downloading ruby-2.4.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.bz2
Installing ruby-2.4.1...
BUILD FAILED (OS X 10.13.2 using ruby-build 20171215)
Inspect or clean up the working tree at /var/folders/31/41tck3qx69scnynksxc_38ch0000gn/T/ruby-build.20171220150125.94300
Results logged to /var/folders/31/41tck3qx69scnynksxc_38ch0000gn/T/ruby-build.20171220150125.94300.log
Last 10 log lines:
checking for long long... yes
checking for off_t... yes
checking char bit... 8
checking size of int... 0
checking size of short... 0
checking size of long... 0
checking size of long long... configure: error: in `/var/folders/31/41tck3qx69scnynksxc_38ch0000gn/T/ruby-build.20171220150125.94300/ruby-2.4.1':
configure: error: cannot compute sizeof (long long)
See `config.log' for more details
make: *** No targets specified and no makefile found. Stop.
Tried all solutions listed above - nothing helped. Any suggestion?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 16 (1 by maintainers)
I have had the same issue but I am able to fix it by doing the following steps:
sudo mv /usr/local/include /usr/local/include_oldRUBY_CONFIGURE_OPTS="--disable-dtrace" rbenv install 2.4.1I had the same issue and here is how I fixed it (thanks to a lot a googling)
then follow the installation until the end (next, next, next,…) and then install like you usually do:
Its almost 2020 and still I got this error. This is how I solved it
First run
Add path found with
brew --prefix opensslto .zshrcOpen new terminal or source RC file
It looks like you’re having problems with ruby-build, which is the plugin that provides
rbenv-install.@thegreyfellow this seeeeeems to be working? 🤞 I’m not getting errors about “cross compiling C programs” and “–host” flags anymore, but my fans are going crazy and it’s stalled at
Installing ruby-2.3.8... ruby-build: use readline from homebrewfor aaaages 😢Update: OMG it worked! Took for EVER to run, though… Thank you so much! ❤️