Replies: 6 comments 44 replies
-
Try using Failing that, you can try setting export HOMEBREW_DEVELOPER=1
export HOMEBREW_USE_RUBY_FROM_PATH=1 As the |
Beta Was this translation helpful? Give feedback.
-
Different issue here, any thoughts?
I installed with:
(and put the second line in my shell init) Running |
Beta Was this translation helpful? Give feedback.
-
Do we know if anyone has successfully installed linuxbrew on ARM? |
Beta Was this translation helpful? Give feedback.
-
ContextCurrently attempting to build a
DockerfileHere's what I've got so far: # onbaordme Debian Bookworm image - for arm64 🤷
FROM debian:bookworm-slim
# this makes debian not prompt for stuff
ENV DEBIAN_FRONTEND=NONINTERACTIVE
# install pre-req apt packages for rbenv, python, and homebrew
# python3 defaults to python 3.11 in Debian Bookworm
RUN apt-get update && \
apt list --upgradeable | grep security | cut -f1 -d '/' | xargs apt-get install --no-install-recommends -y && \
apt-get install -y \
build-essential \
curl \
file \
procps \
git \
python3-pip \
python3-dev \
openssh-client \
sudo \
autoconf \
bison \
patch \
libssl-dev \
libyaml-dev \
libreadline-dev \
zlib1g-dev \
libgmp-dev \
libncurses5-dev \
libffi-dev \
libgdbm6 \
libgdbm-dev \
libdb-dev \
uuid-dev
# create default user
RUN useradd -m friend && \
usermod -aG sudo friend && \
echo 'friend ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
WORKDIR /home/friend
USER friend
ENV HOME="/home/friend"
# make sure we can install executables locally
ENV PATH="$PATH:$HOME/.local/bin:$HOME/.rbenv/bin:$HOME/.linuxbrew/bin"
# ref: https://github.com/rbenv/rbenv-installer
# installs rbenv, ruby-build, followed by openssl 1.1 and then finally ruby 2.6.10
# takes like 25-45 minutes to compile stuff unless you give docker like 8 cores and 16G of mem in resources
RUN curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash && \
echo 'eval "$(rbenv init -)"' >> ~/.bashrc && \
. $HOME/.bashrc && \
rbenv install 2.6.10 && \
rbenv global 2.6.10
# this is so that brew doesn't prompt for sudo access
ENV NONINTERACTIVE=1
# to use ruby from path, see: https://github.com/orgs/Homebrew/discussions/3612#discussioncomment-3572967
ENV HOMEBREW_DEVELOPER=1
ENV HOMEBREW_USE_RUBY_FROM_PATH=1
# linux homebrew on arm is unsupported, see: https://docs.brew.sh/Homebrew-on-Linux#arm-unsupported
# so we have to install ruby ourselves because of these err:
# Error: No Homebrew ruby 2.6.10_1 available for aarch64 processors!
# Error: Failed to install Homebrew Portable Ruby and cannot find another Ruby 2.6.10!
# see: https://github.com/orgs/Homebrew/discussions/3612
RUN git clone https://github.com/Homebrew/brew.git $HOME/.linuxbrew && \
eval "$(brew shellenv)" && \
echo 'eval "$(brew shellenv)"' >> ${HOME}/.bashrc && \
. $HOME/.bashrc
ENTRYPOINT ["/bin/bash"] BuildingThe above docker buildx build --platform linux/arm64 -t jessebot/onboardme:dev . Runningdocker run -it --platform linux/arm64 jessebot/onboardme:dev But when I try to a friend@3ce682f0e4c7:~$ $(which ruby) --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt $(brew --prefix)/Library/Homebrew/utils/ruby_check_version_script.rb 2.6.10 && echo OK
OK
friend@3ce682f0e4c7:~$ brew update
Error: No Homebrew ruby 2.6.10_1 available for aarch64 processors!
Error: Failed to install Homebrew Portable Ruby and cannot find another Ruby 2.6.10!
If there's no Homebrew Portable Ruby available for your processor:
- install Ruby 2.6.10 with your system package manager (or rbenv/ruby-build)
- make it first in your PATH
- try again
friend@3ce682f0e4c7:~$ ruby --version
ruby 2.6.10p210 (2022-04-12 revision 67958) [aarch64-linux]
friend@3ce682f0e4c7:~$ rbenv versions
* 2.6.10 (set by /home/friend/.rbenv/version)
friend@3ce682f0e4c7:~$ which ruby
/home/friend/.rbenv/shims/ruby
friend@3ce682f0e4c7:~$ echo $PATH
/home/friend/.linuxbrew/bin:/home/friend/.linuxbrew/sbin:/home/friend/.rbenv/shims:/home/friend/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/friend/.local/bin:/home/friend/.rbenv/bin:/home/friend/.linuxbrew/bin Any pointers, suggestions, or other help anyone can offer? Happy to test anything you think could help. 💙 I can build a linux/amd64 image using the normal linuxbrew installation instructions, but it runs very sluggish on an M1 pro, so I would love to get this built and running for linux/arm64. 🙏 Edits: fixing dockerfile to be current and adding comments + grammar fixes |
Beta Was this translation helpful? Give feedback.
-
Ok, I finally got around to getting this done and making my own installation steps. I've tried to package this in a single repo with clear instructions in the README, so that it can be reused by everyone without going down any rabbit holes (at least, until it breaks and I'm too busy to update it): https://github.com/huyz/brew-for-linux-arm |
Beta Was this translation helpful? Give feedback.
-
Homebrew/homebrew-portable-ruby#145 https://github.com/orgs/community/discussions/19197 and GitHub Actions: arm64 Linux and Windows runners are now generally available Hi @Bo98 @carlocab. GitHub Actions now supports arm64 Linux. Is it possible to create an arm64 release of portable-ruby to resolve this issue? |
Beta Was this translation helpful? Give feedback.
-
I want to install brew on Linux of ARM processor. When run "brew update", an error occurs:
I have installed Ruby using system package manager,I have installed Ruby using system package management,
the version is not #2.6.8,
~ ruby --version ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [aarch64-linux-gnu]
I don't know how to install ruby 2.6.8 to successfully install brew,My system information:
Linux ARM-20220821 5.15.0-1016-oracle #20-Ubuntu SMP Mon Aug 8 07:08:08 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
Beta Was this translation helpful? Give feedback.
All reactions