{"record":{"id":"d152e0b02a71943c","repo":"abiosoft/colima","slug":"krunkit-not-found-in-path-ninstall-with-brew-tap","errorCode":null,"errorMessage":"krunkit not found in $PATH\\nInstall with: brew tap slp/krunkit && brew install krunkit","messagePattern":"krunkit not found in \\$PATH\\\\nInstall with: brew tap slp/krunkit && brew install krunkit","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/qemu.go","lineNumber":21,"sourceCode":"import (\n\t\"fmt\"\n\t\"os/exec\"\n)\n\n// AssertQemuImg checks if qemu-img is available.\nfunc AssertQemuImg() error {\n\tcmd := \"qemu-img\"\n\tif _, err := exec.LookPath(cmd); err != nil {\n\t\treturn fmt.Errorf(\"%s not found, run 'brew install %s' to install\", cmd, \"qemu\")\n\t}\n\n\treturn nil\n}\n\n// AssertKrunkit checks if krunkit is available.\nfunc AssertKrunkit() error {\n\tif _, err := exec.LookPath(\"krunkit\"); err != nil {\n\t\treturn fmt.Errorf(\"krunkit not found in $PATH\\nInstall with: brew tap slp/krunkit && brew install krunkit\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":3,"sourceCodeEnd":26,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/util/qemu.go#L3-L26","documentation":"AssertKrunkit (util/qemu.go:19) uses exec.LookPath(\"krunkit\") to verify that the krunkit binary is reachable before colima starts a QEMU-type VM; it is called from model/runner.go:111 and config/configmanager/configmanager.go:80. krunkit is colima's macOS virtualization frontend for the 'qemu' VM type (Apple Silicon), distributed via the slp/krunkit Homebrew tap, not bundled with colima. The error means the binary is neither on $PATH nor installed.","triggerScenarios":"Running `colima start --vm-type qemu` (or resuming a saved qemu-type profile) on a host where `brew install krunkit` was never run, where krunkit was uninstalled, or where the shell's $PATH does not yet include the Homebrew prefix after a fresh install.","commonSituations":"New Apple Silicon machines; switching from vz back to qemu VM type; PATH not refreshed in the current shell after brew install; installing to a non-default HOMEBREW_PREFIX whose bin dir is not on PATH; CI runners without the slp/krunkit tap.","solutions":["Install krunkit: `brew tap slp/krunkit && brew install krunkit`","Verify visibility: `which krunkit` (should print e.g. /opt/homebrew/bin/krunkit); open a new shell or `hash -r` if empty","If HOMEBREW_PREFIX is non-default, add `<prefix>/bin` to PATH","Alternatively start with `colima start --vm-type vz` (macOS 13+) or `--vm-type qemu` only after krunkit is present"],"exampleFix":"# before\n$ colima start --vm-type qemu\nError: krunkit not found in $PATH\n\n# after\n$ brew tap slp/krunkit && brew install krunkit\n$ hash -r && which krunkit\n/opt/homebrew/bin/krunkit\n$ colima start --vm-type qemu","handlingStrategy":"validation","validationCode":"// run before colima start with a qemu VM type\nif _, err := exec.LookPath(\"krunkit\"); err != nil {\n    log.Fatal(\"krunkit missing — install: brew tap slp/krunkit && brew install krunkit\")\n}","typeGuard":null,"tryCatchPattern":"if err := util.AssertKrunkit(); err != nil {\n    // fail fast with the install hint; nothing to retry — the binary must exist\n    return fmt.Errorf(\"pre-flight failed: %w\", err)\n}","preventionTips":["Install krunkit before the first `colima start --vm-type qemu`","Open a new shell (or `hash -r`) after brew install so PATH resolves","Pin krunkit in your setup scripts alongside colima","On CI, add a `which krunkit` pre-flight step"],"tags":["dependency","qemu","homebrew","macos","path"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}