{"record":{"id":"ab3bc55427bf09a0","repo":"abiosoft/colima","slug":"s-not-found-run-brew-install-s-to-install","errorCode":null,"errorMessage":"%s not found, run 'brew install %s' to install","messagePattern":"(.+?) not found, run 'brew install (.+?)' to install","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"environment/host/host.go","lineNumber":198,"sourceCode":"func (h hostEnv) Stat(fileName string) (os.FileInfo, error) {\n\treturn os.Stat(fileName)\n}\n\n// IsInstalled checks if dependencies are installed.\nfunc IsInstalled(dependencies environment.Dependencies) error {\n\tvar missing []string\n\tcheck := func(p string) error {\n\t\t_, err := exec.LookPath(p)\n\t\treturn err\n\t}\n\tfor _, p := range dependencies.Dependencies() {\n\t\tif check(p) != nil {\n\t\t\tmissing = append(missing, p)\n\t\t}\n\t}\n\n\tif len(missing) > 0 {\n\t\treturn fmt.Errorf(\"%s not found, run 'brew install %s' to install\", strings.Join(missing, \", \"), strings.Join(missing, \" \"))\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":180,"sourceCodeEnd":203,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/environment/host/host.go#L180-L203","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","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'.","If brew reports the package installed but LookPath still fails, 'brew link --overwrite <pkg>' or reinstall it.","For nix users, use the provided colima.nix/flake which brings the dependencies."],"exampleFix":"# before\n$ colima start --kubernetes\nkubectl not found, run 'brew install kubectl' to install\n# after\n$ brew install kubectl\n$ command -v kubectl && colima start --kubernetes","handlingStrategy":"validation","validationCode":"// check dependencies before starting colima programmatically\nif err := host.IsInstalled(kubernetesRuntime{}); err != nil {\n    log.Fatalf(\"missing host dependencies: %v\", err) // prints the brew hint\n}","typeGuard":"func missingDependencies(deps []string) []string {\n    var missing []string\n    for _, p := range deps {\n        if _, err := exec.LookPath(p); err != nil {\n            missing = append(missing, p)\n        }\n    }\n    return missing\n}","tryCatchPattern":"if err := host.IsInstalled(deps); err != nil {\n    // message names every missing binary; on Linux translate 'brew install' to apt/dnf\n    return fmt.Errorf(\"preconditions failed: %w\", err)\n}","preventionTips":["Install kubectl/lima/qemu up front: brew install kubectl lima (or distro packages on Linux).","Export /opt/homebrew/bin (Apple Silicon) in every shell/launcher/CI context that runs colima.","Run 'colima version' as a smoke test in CI to surface missing deps early."],"tags":["dependencies","host","path","homebrew","install-check"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}