abiosoft/colima · error

%s not found, run 'brew install %s' to install

Error message

%s not found, run 'brew install %s' to install

What it means

AssertQemuImg checks exec.LookPath("qemu-img") and reports that the binary is not on PATH, suggesting brew install qemu. It is a pure dependency check — nothing is executed. On Linux the brew hint is misleading: the qemu-utils (Debian/Ubuntu) or qemu-img (Fedora) package is the usual source of the binary.

Source

Thrown at util/qemu.go:12

package util

import (
	"fmt"
	"os/exec"
)

// AssertQemuImg checks if qemu-img is available.
func AssertQemuImg() error {
	cmd := "qemu-img"
	if _, err := exec.LookPath(cmd); err != nil {
		return fmt.Errorf("%s not found, run 'brew install %s' to install", cmd, "qemu")
	}

	return nil
}

// AssertKrunkit checks if krunkit is available.
func AssertKrunkit() error {
	if _, err := exec.LookPath("krunkit"); err != nil {
		return fmt.Errorf("krunkit not found in $PATH\nInstall with: brew tap slp/krunkit && brew install krunkit")
	}

	return nil
}

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Install it: brew install qemu (macOS) or sudo apt install qemu-utils (Debian/Ubuntu) / sudo dnf install qemu-img (Fedora)
  2. Ensure the Homebrew bin dir is on PATH, e.g. eval "$(brew shellenv)" in the invoking shell or CI config
  3. Verify with qemu-img --version before retrying
  4. For containers, add qemu-utils to the image

Example fix

# before: check fails
$ qemu-img --version
zsh: command not found: qemu-img

# after
$ brew install qemu            # macOS
$ sudo apt install qemu-utils   # Debian/Ubuntu
$ qemu-img --version
Defensive patterns

Strategy: validation

Validate before calling

if _, err := exec.LookPath("qemu-img"); err != nil {
    return fmt.Errorf("qemu-img missing: brew install qemu (macOS) or apt install qemu-utils (Linux)")
}
err := util.AssertQemuImg()

Prevention

When it happens

Trigger: Calling util.AssertQemuImg (e.g. before qcow2 disk operations) when qemu-img is not installed, or its directory (/opt/homebrew/bin, /usr/local/bin) is missing from PATH in the invoking shell, CI step, or container.

Common situations: Fresh machine without qemu; GUI-launched or CI shells that skip profile setup so Homebrew's bin dir is absent; running inside a container without qemu packages.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/87de28ee2a198c0c. Report an issue: GitHub.