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.
Error: some-formula: no bottle available!
You can try to install from source with:
brew install --build-from-source some-formulaCommon 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
- Run
brew updateto refresh formula definitions and bottle availability. - Retry the install; a bottle may now exist for the runner macOS.
- If still none, build from source explicitly.
brew update
brew install some-formula || brew install --build-from-source some-formulaPin 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.
runs-on: macos-14How to prevent it
- Run
brew updatebefore 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.