Installation issues with Arm Mac (M1 Chip) #1853
Replies: 88 comments 18 replies
-
I have the same problem, here is full log output to help you. Also on my new MacBook Pro with M1.
I tried different flags and absolutely no flags, aka Thanks for excellent work, and Merry Christmas. |
Beta Was this translation helpful? Give feedback.
-
I only confirm to work native arm arch with M1 chip. I'm not sure what happened with the mix environment provided by Rosetta2. |
Beta Was this translation helpful? Give feedback.
-
I'm also running into the same issue with the M1 Chip MacBook Pro and am seeing the same undeclared identifier 'username_completion_function' error as described by @TheMlok. @hsbt I installed via |
Beta Was this translation helpful? Give feedback.
-
Yes.
|
Beta Was this translation helpful? Give feedback.
-
Same issue here with my new MBA M1. Tried with Homebrew and Basic GitHub Checkout. |
Beta Was this translation helpful? Give feedback.
-
It seems you all mix readline compiled for ARM with Ruby for x64. That will never work properly. It's not good idea to mix these platforms together. Just use separated Homebrew for ARM and for x64. @hsbt I believe the issue is in readline. |
Beta Was this translation helpful? Give feedback.
-
Hi! Im also trying to install Ruby. Ive been reading your post and the following answers. Could you please advise on how to do this? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello, please have you any rollout how to setup everything properly to the working state? I need to switch my ntb at job for a new one. I just followed guidelines. I installed homebrew with rosetta2 and then |
Beta Was this translation helpful? Give feedback.
-
Just open terminal and |
Beta Was this translation helpful? Give feedback.
-
Hello, please how did you install natively? Using Homebrew or compilation, please can you give some details? I will try it. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I have solved it. I deleted Homebrew and install it natively for ARM, installed rbenv and symlinked into |
Beta Was this translation helpful? Give feedback.
-
@TheMlok How did you install Homebrew natively for ARM? When I tried, I get "Homebrew is not (yet) supported on ARM processors". I installed Homebrew as shown here and got the errors shown above. |
Beta Was this translation helpful? Give feedback.
-
I had some success by using the latest Homebrew install script (which adds partial support for M1), then:
Update: 2020-12-29: I got 2.7.2 working by:
|
Beta Was this translation helpful? Give feedback.
-
With the latest version of Homebrew I was able to install rbenv without any issues. (Also had to install openssl) |
Beta Was this translation helpful? Give feedback.
-
tl;dr make sure you're using rbenv to install a recent release of Ruby, i.e. Ruby 2.7.2 instead of Ruby 2.7.1 I did this all today on a new 13" M1 MacBook Pro
I then noticed that
But following what worked for @tcannonfodder,
From there, I updated the required Ruby version in my project's Gemfile, ran
For what it's worth, the nvm install script worked fine, as well as Entertainingly, as Node compiled from source and there were 4x clang instances showing in Activity Monitor at all times for 15 minutes, my computer seemed bored and everything was ⚡ fast! Yay M1. |
Beta Was this translation helpful? Give feedback.
-
I tried a whole bunch of stuff and, at the end, reinstalling homebrew from souce and reinstalling rbenv did it for me. Then, $ rbenv install $VERSION, as usual. 🤪 |
Beta Was this translation helpful? Give feedback.
-
For installing Ruby 3.1.2 on an M1 I had to do:
Source: #1933 (comment) |
Beta Was this translation helpful? Give feedback.
-
for 2.6.9
|
Beta Was this translation helpful? Give feedback.
-
Maybe this can help someone else but I simply needed to follow his https://blog.smittytone.net/2021/02/07/how-to-migrate-to-native-homebrew-on-an-m1-mac/:
|
Beta Was this translation helpful? Give feedback.
-
I have tried all the above and still get
|
Beta Was this translation helpful? Give feedback.
-
Just for the record: was able to instsall 2.7.1 with the following line in by
Did not mess with any other env variables. |
Beta Was this translation helpful? Give feedback.
-
Error I got: readline.c:1903:37: error: use of undeclared identifier 'username_completion_function'; did you mean 'rl_username_completion_function'?
rl_username_completion_function); Successfully installed Ruby 2.7.7 and 3.2.1 with RUBY_CFLAGS="-Wno-error=implicit-function-declaration" arch -x86_64 rbenv install 2.7.7 |
Beta Was this translation helpful? Give feedback.
-
The
|
Beta Was this translation helpful? Give feedback.
-
I was only successful following the Ruby on Rails install guide for macOS 13 Ventura: https://gorails.com/setup/macos/13-ventura |
Beta Was this translation helpful? Give feedback.
-
I tried most suggestions, but none works. for me following this blog actually works for me. |
Beta Was this translation helpful? Give feedback.
-
After trying alot of solutions, the code referred to the post below worked for me when installing ruby 2.5.9 on an M2 Macbook Air running Ventura 13.6
Something to note also, is my terminal was running Rosetta 2 |
Beta Was this translation helpful? Give feedback.
-
For reference: If your brew location is:
and you're on an ARM mac, then you have the x86 binary installed. You can confirm with
To setup the ARM binary, uninstall brew, and then reinstall brew. You can confirm you have the ARM install of brew by:
and
|
Beta Was this translation helpful? Give feedback.
-
Solution without RosettaThis is for old versions that use
|
Beta Was this translation helpful? Give feedback.
-
FYI: I published https://github.com/hsbt/old-ruby-build that is build script + patchsets for Apple Silicon. |
Beta Was this translation helpful? Give feedback.
-
this worked for me on MacOs 14.4.1
|
Beta Was this translation helpful? Give feedback.
-
Hey there!
I am trying to install Ruby 2.7.2 on my new Apple Silicon Mac but am running into some issues, which I think might be related to
ruby-build
, but not I am not 100%.I have setup an alias on my
~/.zshrc
for Homebrew like this:I have run the following commands in order to install
rbenv
:I have updated my .zshrc file with:
And then I ran the following command:
I have also tried prefixing the
rbenv
command witharch -x86_64
but that did not work either.These are the console logs that I am getting when I am trying to install Ruby:
If you have any ideas for how to make this work, please let me know!
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions