Ruby-build: Can still install ruby 2.5.1 on my MacOS

Created on 13 Sep 2018  路  5Comments  路  Source: rbenv/ruby-build

Hi,
I know ruby 2.5.1 is not present right now on the rbenv install --list but I saw another issue which proposes to run the following code:

RUBY_CONFIGURE_OPTS="--disable-dtrace" rbenv install

ISSUES - 1078

If I do that with ruby 2.5.1, it's not working for me. Is there another solution or may I missed a step to resolve this issue?

Thanks in advance for your help and I'm sorry if this is a duplicate issue.

Most helpful comment

Fixed my install issue by installing Mac OS SDK headers

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg  -target /

From XCode 10 release notes

New Features
The Command Line Tools package installs the macOS system headers inside the macOS SDK. Software that compiles with the installed tools will search for headers within the macOS SDK provided by either Xcode at:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

or the Command Line Tools at:

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

depending on which is selected using xcode-select.

The command line tools will search the SDK for system headers by default. However, some software may fail to build correctly against the SDK and require macOS headers to be installed in the base system under /usr/include. If you are the maintainer of such software, we encourage you to update your project to work with the SDK or file a bug report for issues that are preventing you from doing so. As a workaround, an extra package is provided which will install the headers to the base system. In a future release, this package will no longer be provided. You can find this package at:

/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

鈥═o make sure that you're using the intended version of the command line tools, run xcode-select -s <path to Xcode> or xcode select -s /Library/Developer/CommandLineTools after installing.

Hope it helps.

All 5 comments

Same issue here 2.5.3, which is on the list

# rbenv install 2.5.3
ruby-build: use openssl from homebrew
Downloading ruby-2.5.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.bz2
Installing ruby-2.5.3...
ruby-build: use readline from homebrew

BUILD FAILED (OS X 10.14 using ruby-build 20181019)

Inspect or clean up the working tree at /var/folders/yn/klyb4gv54rq1m99zvl9bm9_r0000gn/T/ruby-build.20181103210858.3211
Results logged to /var/folders/yn/klyb4gv54rq1m99zvl9bm9_r0000gn/T/ruby-build.20181103210858.3211.log

Last 10 log lines:
checking host system type... x86_64-apple-darwin18.0.0
checking target system type... x86_64-apple-darwin18.0.0
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/var/folders/yn/klyb4gv54rq1m99zvl9bm9_r0000gn/T/ruby-build.20181103210858.3211/ruby-2.5.3':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

Installing Xcode command line tools does not resolve the issue.

Fixed my install issue by installing Mac OS SDK headers

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg  -target /

From XCode 10 release notes

New Features
The Command Line Tools package installs the macOS system headers inside the macOS SDK. Software that compiles with the installed tools will search for headers within the macOS SDK provided by either Xcode at:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

or the Command Line Tools at:

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

depending on which is selected using xcode-select.

The command line tools will search the SDK for system headers by default. However, some software may fail to build correctly against the SDK and require macOS headers to be installed in the base system under /usr/include. If you are the maintainer of such software, we encourage you to update your project to work with the SDK or file a bug report for issues that are preventing you from doing so. As a workaround, an extra package is provided which will install the headers to the base system. In a future release, this package will no longer be provided. You can find this package at:

/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

鈥═o make sure that you're using the intended version of the command line tools, run xcode-select -s <path to Xcode> or xcode select -s /Library/Developer/CommandLineTools after installing.

Hope it helps.

Yes, everything works correctly know!
Sorry for the delay and thanks for your help ;)

Thanks @punjab ! It helped me ! 馃憤

Thank you, it worked for me too!

Was this page helpful?
0 / 5 - 0 ratings