jdx/mise · error

brew: : package lookup supports macOS arm64 and Linux…

Error message

brew:{name}: package lookup supports macOS arm64 and Linux x86_64/arm64

What it means

`mise system where brew:<name>` requires a working Homebrew installation on a supported platform (macOS arm64, Linux x86_64/arm64). When `BrewManager::new().is_available()` reports false — Homebrew missing or unsupported host — run() bails with this capability message instead of attempting the lookup.

Solutions

  1. Install Homebrew (Linuxbrew on Linux) and ensure `brew` is on PATH, then retry
  2. Confirm the platform is macOS arm64 or Linux x86_64/arm64; on other architectures brew lookup is not supported
  3. Resolve the path manually with `brew --prefix <formula>` if reinstalling brew is not an option

Example fix

// before (no brew on machine)
mise system where brew:ripgrep
// after
brew --version || install-homebrew
mise system where brew:ripgrep
Defensive patterns

Strategy: fallback

Validate before calling

command -v brew >/dev/null 2>&1 && [[ "$(uname -m)" == arm64 || "$(uname -m)" == x86_64 ]] && mise system where "brew:$name"

Try / catch

mise system where "brew:$name" 2>/dev/null || brew --prefix "$name"

Prevention

When it happens

Trigger: Running `mise system where brew:<formula>` where brew is absent from PATH, the Homebrew prefix cannot be found, or the platform is not one of macOS arm64 / Linux x86_64 / Linux arm64 (e.g. Linux on another architecture, or non-unix).

Common situations: Linux CI on non-x86_64/arm64 archs; containers without Homebrew; users expecting mise to resolve brew paths on machines where brew was never installed.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/efcbe8d4da5f1f67. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/system/where.rs:36

    package: String,
}

impl SystemWhere {
    /// Print one stable opt path after local validation succeeds; return errors before writing stdout.
    pub(crate) async fn run(self) -> Result<()> {
        let (manager, name) = crate::system::parse_spec(&self.package)
            .wrap_err("use brew:<formula> or brew:<owner>/<tap>/<formula> for package lookup")?;
        if manager != "brew" {
            bail!(
                "bootstrap packages where currently supports brew: formulae; unsupported package {}",
                self.package
            );
        }
        #[cfg(unix)]
        {
            use crate::system::packages::{SystemPackageManager, brew};
            if !brew::BrewManager::new().is_available() {
                bail!("brew:{name}: package lookup supports macOS arm64 and Linux x86_64/arm64");
            }
            let root = brew::package_root(&name)?;
            miseprintln!("{}", path_for_output(&root)?);
            Ok(())
        }
        #[cfg(not(unix))]
        bail!("brew:{name}: package lookup supports macOS arm64 and Linux x86_64/arm64")
    }
}

#[cfg(any(unix, test))]
/// Borrow a lossless, single-line UTF-8 path suitable for shell command substitution.
fn path_for_output(path: &Path) -> Result<&str> {
    match path.to_str() {
        Some(value) if !value.contains(['\r', '\n']) => Ok(value),
        _ => bail!(
            "the prefix cannot be printed as a single UTF-8 path; use a compatible prefix path"
        ),

View on GitHub (pinned to 533346cc37)