brew icon indicating copy to clipboard operation
brew copied to clipboard

ARM64 Linux support

Open ZhongRuoyu opened this issue 10 months ago • 10 comments

We hope to provide official support for ARM64 Linux, starting with a beta later this year. That includes providing bottles for the platform, and bringing first-class support for brew and core formulae.

To make this happen, the following need to be settled (roughly in order):

  • [x] Release Portable Ruby - https://github.com/Homebrew/brew/pull/19111 / https://github.com/Homebrew/homebrew-portable-ruby/pull/278
  • [x] Provide Docker images - https://github.com/Homebrew/brew/pull/19275
  • [x] Support bootstrapping glibc - https://github.com/Homebrew/glibc-bootstrap/pull/31
  • [ ] Prepare CI infrastructure for bottling, similar to x86_64 Linux:
    • [x] rely on GitHub-hosted runners mostly, - https://github.com/Homebrew/homebrew-core/pull/211313
    • [ ] and self-hosted runner for long-timeout runs
  • [ ] Start bottling core formulae - https://github.com/Homebrew/homebrew-core/issues/211761

Also, the following will happen when we feel comfortable:

  • [x] Add installer support - https://github.com/Homebrew/install/pull/963
  • [ ] Announce beta for ARM64 Linux (this will happen after a significant portion of formulae are bottled)

What is the motivation for the feature?

There has been considerable interest, both internally and externally, in running Homebrew on ARM64 Linux. Having discussed this at the 2025 AGM, we believe that it is feasible for us to start working on this.

How will the feature be relevant to at least 90% of Homebrew users?

Users on ARM64 machines like Raspberry Pis and Ampere servers can also benefit from Homebrew on Linux. Apple Silicon users can also run Homebrew in Docker natively.

What alternatives to the feature have been considered?

Provide a limited level of support for the platform, most likely shipping the aforementioned features barring the bottling-related ones. This will essentially place Homebrew on ARM64 Linux at a support level similar to Rust's tier 3 support.

ZhongRuoyu avatar Feb 03 '25 14:02 ZhongRuoyu

Start with Ubuntu 24.04 or just keep in sync with x86_64 Linux?

cheese avatar Feb 06 '25 15:02 cheese

Start with Ubuntu 24.04 or just keep in sync with x86_64 Linux?

This is irrelevant to specific distro releases. The aim is to support any ARM64 Linux system, as is the case with Homebrew on x86_64 Linux (which works for systems with glibc > 2.13).

If you mean Homebrew's CI environment, it will be kept in sync with x86_64 Linux.

ZhongRuoyu avatar Feb 07 '25 12:02 ZhongRuoyu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Mar 01 '25 00:03 github-actions[bot]

Support linux in aarch platform will promote the use of homebrew vigorously : )

sihaixianyu avatar Mar 21 '25 07:03 sihaixianyu

Support linux in aarch platform will promote the use of homebrew vigorously : )

Heheh not sure if Homebrew needs more vigorous promotion. The awesome Homebrew volunteers are quite busy as it is 😃. I believe Linux ARM support is already on the way anyway

huyz avatar Mar 21 '25 08:03 huyz

In my use case, with devcontainers, using one of the default images mcr.microsoft.com/vscode/devcontainers/go on a MacBook with an M1 processor (which has support for the arm64 arch), when i try to install brew inside the container, I get the default stub.

$ lscpu | grep Architecture
Architecture:                         aarch64

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Homebrew on Linux is not supported on ARM processors.
  https://docs.brew.sh/Homebrew-on-Linux#arm-unsupported

kvokka avatar Mar 31 '25 22:03 kvokka

I observed that while there is already an arm64 image with master tag, there is none under latest tag, preventing us from building with:

FROM ghcr.io/homebrew/brew:latest
# but it works with :master

Hopefully this will be addressed soon, as I don't fancy using master at it will change too often.

ssbarnea avatar Apr 15 '25 17:04 ssbarnea

This is intentional for now while many issues are still being ironed out. brew install go for example was only became functional a few days ago. There's still some high profile packages we're working on (qt and ghc).

The main reasons for this is because:

  • We are fixing things daily so want a fast-updating tag rather than a once-per-week.
  • Docker on macOS will eagerly choose arm64 if available on Apple Silicon, which we're not ready for people to switch to that yet.

Basically: still consider arm64 Linux as experimental at this stage (it's tier 2 support: https://docs.brew.sh/Support-Tiers), even though it quite stable and nearing completion. master means you are explicitly opting into that experimental status.

We will start pushing latest + versioned tags soon. Possibly starting with Homebrew 4.5.0. I suspect we'll have something here within the next couple weeks as we've now reached 85% coverage and I'm working on fixing some of the outstanding blockers this week.

Bo98 avatar Apr 15 '25 18:04 Bo98

https://github.com/Homebrew/homebrew-core/pull/216928 is crucial for musl hosts, which are even more prevalent in the arm64 world due to postmarketOS. A glibc bottle is the one missing piece to have equal experience to x86 hosts.

valpackett avatar May 22 '25 05:05 valpackett

Locoabordo avatar Jun 04 '25 00:06 Locoabordo

FWIW, I was able to get this working on GitHub's ubuntu-22.04-arm hosted image but I had to disable the brew test-bot --only-setup step because brew doctor was return a non-zero exit code due to the warning about ARM64 being tier 2. I also had to pre-install Homebrew because their hosted image for ARM64 excludes it due to it being tier 2 and, as GitHub documented it, "no available packages". I just run the install scripts on https://brew.sh and it works fine. I opened a bug against them to add it: https://github.com/actions/partner-runner-images/issues/104

Here's my slightly modified GitHub Actions workflow and formula modifications: https://github.com/heaths/homebrew-tap/pull/7.

heaths avatar Jun 24 '25 06:06 heaths

This is sufficiently done for now as we're made it Tier 1. Maintainers: would appreciate help moving forwards on self-hosted work.

MikeMcQuaid avatar Nov 05 '25 08:11 MikeMcQuaid

@MikeMcQuaid beautiful! Been waiting for this day for years.

P.S.: What self-hosted work?

huyz avatar Nov 05 '25 09:11 huyz

Thanks for the kind words @huyz.

P.S.: What self-hosted work?

We still have some work to do to setup a Linux self-hosted runner like we have for x86_64 for arm64.

MikeMcQuaid avatar Nov 05 '25 09:11 MikeMcQuaid

(the call for help here was specifically for maintainers, will raise that)

MikeMcQuaid avatar Nov 05 '25 09:11 MikeMcQuaid

This is sufficiently done for now as we're made it Tier 1.

I've just installed Homebrew (v4.6.20) on a Linux 6.14.0-1010-oracle aarch64 box and brew spits out it's still Tier 2 support. Is the update still being rolled out or I'm mixing something up? Thanks.

Warning: Your CPU architecture (arm64) is not supported. We only support
x86_64 CPU architectures. You will be unable to use binary packages (bottles).

This is a Tier 2 configuration:
  https://docs.brew.sh/Support-Tiers#tier-2
You can report Tier 2 unrelated issues to Homebrew/* repositories!
Read the above document before opening any issues or PRs.

yermulnik avatar Nov 05 '25 12:11 yermulnik

Is the update still being rolled out

Yes, please be patient.

MikeMcQuaid avatar Nov 05 '25 13:11 MikeMcQuaid

https://github.com/Homebrew/brew/releases/tag/5.0.0 🎉🎉

chenrui333 avatar Nov 12 '25 15:11 chenrui333