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

Produced by environment/host.IsInstalled: exec.LookPath failed for one or more required host dependencies, and the error suggests installing them via Homebrew ('run \'brew install …\''). The dependency list comes from the runtime's Dependencies() (e.g. 'kubectl' for the kubernetes runtime; limactl for the VM), and the message assumes macOS/Homebrew even though colima also runs on Linux.

Source

Thrown at environment/host/host.go:198

func (h hostEnv) Stat(fileName string) (os.FileInfo, error) {
	return os.Stat(fileName)
}

// IsInstalled checks if dependencies are installed.
func IsInstalled(dependencies environment.Dependencies) error {
	var missing []string
	check := func(p string) error {
		_, err := exec.LookPath(p)
		return err
	}
	for _, p := range dependencies.Dependencies() {
		if check(p) != nil {
			missing = append(missing, p)
		}
	}

	if len(missing) > 0 {
		return fmt.Errorf("%s not found, run 'brew install %s' to install", strings.Join(missing, ", "), strings.Join(missing, " "))
	}

	return nil
}

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Install what the message names: on macOS 'brew install <listed packages>' (e.g. brew install kubectl); on Linux use your distro's packages or download binaries into PATH.
  2. Fix PATH for the failing context: export PATH="/opt/homebrew/bin:$PATH" (or /usr/local/bin) in the shell/launcher/CI job that runs colima; verify with 'command -v kubectl'.
  3. If brew reports the package installed but LookPath still fails, 'brew link --overwrite <pkg>' or reinstall it.
  4. For nix users, use the provided colima.nix/flake which brings the dependencies.

Example fix

# before
$ colima start --kubernetes
kubectl not found, run 'brew install kubectl' to install
# after
$ brew install kubectl
$ command -v kubectl && colima start --kubernetes
Defensive patterns

Strategy: validation

Validate before calling

// check dependencies before starting colima programmatically
if err := host.IsInstalled(kubernetesRuntime{}); err != nil {
    log.Fatalf("missing host dependencies: %v", err) // prints the brew hint
}

Type guard

func missingDependencies(deps []string) []string {
    var missing []string
    for _, p := range deps {
        if _, err := exec.LookPath(p); err != nil {
            missing = append(missing, p)
        }
    }
    return missing
}

Try / catch

if err := host.IsInstalled(deps); err != nil {
    // message names every missing binary; on Linux translate 'brew install' to apt/dnf
    return fmt.Errorf("preconditions failed: %w", err)
}

Prevention

When it happens

Trigger: Starting a profile whose dependencies are absent: 'colima start --kubernetes' without kubectl on PATH; fresh machine without lima/qemu; PATH not including /opt/homebrew/bin or /usr/local/bin so LookPath misses installed binaries; GUI launcher/cron contexts with minimal PATH; after a brew cleanup that unlinked packages.

Common situations: New installs that skipped 'brew install kubectl lima'; Apple Silicon users whose /opt/homebrew/bin is not in PATH for non-interactive shells; running colima from IDE tasks or CI that trim PATH; Linux users confused by the brew-specific advice (install via apt/dnf or build from source instead); nix users needing the colima package with its propagated deps.

Related errors


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