rbenv install 2.6.5 failing: BUILD FAILED (macOS 11.6 using ruby-build 20210928) #2221
Replies: 11 comments 3 replies
-
I have this same Build Failed error with 3.0.0 except, my build fails during the install of openssl-1.1.1l. Log attached. ruby-build.20211012143529.16821.log Downloading openssl-1.1.1l.tar.gz... BUILD FAILED (macOS 11.6 using ruby-build 20210928) Inspect or clean up the working tree at /var/folders/h8/y2qk65cs3zd35cq2frzj_wqc0000gn/T/ruby-build.20211012143529.16821.OcOFOF Last 10 log lines: |
Beta Was this translation helpful? Give feedback.
-
I had multiple versions of ruby installed. After I uninstalled everything and reinstalled only 2.6.5, it worked for me. I think failing during install of openssl-1.1.1l may be a different issue anyway. |
Beta Was this translation helpful? Give feedback.
-
nothing works .. |
Beta Was this translation helpful? Give feedback.
-
I'm getting this same error on macOS 11.6 and 12.0.1 (m1 chip), I'm going to uninstall and reinstall everything and see where that takes me |
Beta Was this translation helpful? Give feedback.
-
I'm getting the same issue trying to install 2.6.3 but i am able to install and use 3.0.2 and 3.0.3 just fine, maybe the issue is just with 2.6.x? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks, this also worked for me. |
Beta Was this translation helpful? Give feedback.
-
Legend @x-warukira! That's finally fixed being unable to install |
Beta Was this translation helpful? Give feedback.
-
This Worked on my machine On that note - would it be possible to persistently set that variable for the context of @x-warukira How did You find the solution? I am interested to see what component reads the |
Beta Was this translation helpful? Give feedback.
-
There are several misconceptions going on here. First, the "-Wno-error=implicit-function-declaration" flag should never be set. It's a dangerous hack that overrides macOS defaults, as explained here: #2001 (comment) I've been using Ruby for 13 years and not a single time have I ever had to set that flag. If you have a proper Ruby dev setup, and you're installing the appropriate version of Ruby in the appropriate context, you should never need to set that flag. The second misconception is that if your project is using a specific version of Ruby, then your only option is to install that specific version. I see so many people try to install older versions of Ruby 2.6.x, like in this GitHub issue, when the solution is to update your project to the latest patch version (the 3rd digit), which is 2.6.10. rbenv/ruby-build can install 2.6.x versions as old as 2.6.8 on Apple Silicon Macs in native mode without any issues and without having to set any flags. Here's a detailed article I wrote that explains how and why to upgrade the Ruby version in your project. If for some highly unlikely reason you absolutely need to use a version of 2.6.x older than 2.6.8, then the best option is to use Rosetta. |
Beta Was this translation helpful? Give feedback.
-
Thank you, it works for me as well MacOS 14.5 |
Beta Was this translation helpful? Give feedback.
-
Please see the attached log. It is unclear to me what is wrong. I'll appreciate any help I can get.
% rbenv install 2.6.5
Downloading openssl-1.1.1l.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
Installed openssl-1.1.1l to /Users/amitmahajan/.rbenv/versions/2.6.5
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 (macOS 11.6 using ruby-build 20210928)
Inspect or clean up the working tree at /var/folders/qn/6glckh8s1jn5x74lj7bkm7gr0000gn/T/ruby-build.20211006144832.95659.r8FA33
Results logged to /var/folders/qn/6glckh8s1jn5x74lj7bkm7gr0000gn/T/ruby-build.20211006144832.95659.log
Last 10 log lines:
imemo_type_ids[9] = rb_intern("imemo_parser_strterm");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../.././include/ruby/ruby.h:1826:56: note: expanded from macro 'rb_intern'
extension (RUBY_CONST_ID_CACHE((ID), (str))) :
^
1340 warnings generated.
linking shared-object objspace.bundle
422 warnings generated.
linking shared-object date_core.bundle
make: *** [build-ext] Error 2
ruby-build.20211006144832.95659.log
Beta Was this translation helpful? Give feedback.
All reactions