ruby-build: Unable to install Ruby 2.6.5 on macOS 10.15 Catalina
Hi,
I’m trying to rbenv install 2.6.5 after upgrading from Mojave to Catalina and I am getting the following error(s):
rbenv install
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.15 using ruby-build 20191004)
Inspect or clean up the working tree at /var/folders/j8/dw62n33d4gl3y2nzr_ky09400000gn/T/ruby-build.20191008094457.36804
Results logged to /var/folders/j8/dw62n33d4gl3y2nzr_ky09400000gn/T/ruby-build.20191008094457.36804.log
Last 10 log lines:
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nonnull
190 warnings generated.
190 warnings generated.
216 warnings generated.
190 warnings generated.
216 warnings generated.
190 warnings generated.
221 warnings generated.
Any clue on how to fix this?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 37 (4 by maintainers)
@bforma @mamantoha Try this
SDKROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk".I believe this will work as well if you’re unable or unwilling to disable SIP. Give me a bit and I’ll restore the old version and see if this solves it.
Oh, probably
RUBY_CONFIGURE_OPTSis good for ruby-build users.I’ve set
CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include, otherwise there is a complaint thatstdio.hcannot be found.Thanks @bforma . I have the same issue.
Actually unlinking
llvmdidn’t help me. I completely uninstall allllvmversions viabrew. And then it was fixed.I could install 2.6.5 with Catalina
Maybe, you need to invoke
xcode-select --installagain.@bforma @mamantoha Problems on the macOS related with LLVM have been fixed in https://github.com/Homebrew/homebrew-core/pull/45304 and it has been merged today so it’s already available in the latest brew.
Could you try this?
You can check statuses of other LLVM versions can be seen in https://github.com/Homebrew/homebrew-core/issues/45061#issuecomment-547671808.
Got it working. Apparently I had an old version (6) of
llvmlinked viabrew(thus also using an old version ofclang).brew unlink llvm@6fixed that. Also needed tounset CPATH.@joshuapinter and @imbsky I was able to install ruby using
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" rbenv installand it worked great. Thanks for finding solutions for this issue!This one worked for me. My openssl was linked to libressl.
Does not work. I tried:
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.6.5But I still get the same ErrorBUILD FAILED (OS X 10.15.2 using ruby-build ...)I try
gem install bundler- but get the following error:ERROR: While executing gem … (Errno::EACCES) Permission denied @ rb_sysopen - /Users/cibuild/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.1.0/CHANGELOG.md
What else can I do ?
@jarod-legault I’m glad to hear that! Have a good rbenv life.
I tried but couldn’t reproduce the initial issue. 🤷♂
So, for others, it’s worth trying this solution before replacing the system’s
openssl.👍