Skip to content
Latchkey

macOS runner: Homebrew "cannot be installed as a binary package" in CI

Homebrew has no prebuilt bottle for the runner macOS version, so it falls back to building the formula from source. The build is slow and may fail if the toolchain or dependencies are missing.

What this error means

A brew install on macos-latest prints "Error: <formula>: no bottle available!" or "cannot be installed as a binary package" and then starts a long source compile, sometimes failing.

Homebrew
Error: some-formula: no bottle available!
You can try to install from source with:
  brew install --build-from-source some-formula

Common causes

No bottle published for this macOS release

When a runner is upgraded to a newer macOS (or you pin an older one), a formula may not yet have a bottle built for that exact OS, so Homebrew cannot install a binary.

A tapped or custom formula ships no bottle

Third-party taps often have no bottles, so every install is a source build that needs a working compiler.

How to fix it

Update Homebrew so newer bottles are seen

  1. Run brew update to refresh formula definitions and bottle availability.
  2. Retry the install; a bottle may now exist for the runner macOS.
  3. If still none, build from source explicitly.
Terminal
brew update
brew install some-formula || brew install --build-from-source some-formula

Pin a runner macOS that has bottles

Targeting a specific stable macOS image label instead of the rolling latest avoids landing on a release before bottles are published.

.github/workflows/ci.yml
runs-on: macos-14

How to prevent it

  • Run brew update before installing so the newest bottles are visible.
  • Pin a stable macOS image label rather than always tracking the newest.
  • Expect source builds for custom-tap formulae and install a toolchain.

Frequently asked questions

What causes "brew "cannot be installed as a binary package""?
When a runner is upgraded to a newer macOS (or you pin an older one), a formula may not yet have a bottle built for that exact OS, so Homebrew cannot install a binary.
How do I fix brew "cannot be installed as a binary package"?
Update Homebrew so newer bottles are seen

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card