{"record":{"id":"ca2888ac742ba26b","repo":"abiosoft/colima","slug":"dependency-check-failed-for-s-w","errorCode":null,"errorMessage":"dependency check failed for %s: %w","messagePattern":"dependency check failed for (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/app.go","lineNumber":577,"sourceCode":"\t\t}\n\t\tcontainers = append(containers, env)\n\t}\n\n\t// detect and add kubernetes\n\tif k, err := c.containerEnvironment(kubernetes.Name); err == nil && k.Running(ctx) {\n\t\tcontainers = append(containers, k)\n\t}\n\n\treturn containers, nil\n}\n\nfunc (c colimaApp) containerEnvironment(runtime string) (environment.Container, error) {\n\tenv, err := environment.NewContainer(runtime, c.guest.Host(), c.guest)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error initiating container runtime: %w\", err)\n\t}\n\tif err := host.IsInstalled(env); err != nil {\n\t\treturn nil, fmt.Errorf(\"dependency check failed for %s: %w\", runtime, err)\n\t}\n\n\treturn env, nil\n}\n\nfunc (c colimaApp) Runtime() (string, error) {\n\treturn c.currentRuntime(context.Background())\n}\n\nfunc (c colimaApp) Kubernetes() (environment.Container, error) {\n\treturn c.containerEnvironment(kubernetes.Name)\n}\n\nfunc (c colimaApp) Active() bool {\n\treturn c.guest.Running(context.Background())\n}\n\nfunc (c *colimaApp) Update() error {","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/app/app.go#L559-L595","documentation":"Returned by colimaApp.containerEnvironment (app/app.go:577) when host.IsInstalled(env) fails: the host-side client CLI for the selected container runtime (docker, containerd/ctr, incus, or kubectl for the kubernetes environment) is missing or not functional on the macOS host. The %s is the runtime name, the %w carries the dependency-check detail.","triggerScenarios":"`colima start --runtime docker` (or colima update/kubernetes flows) when the matching client binary is not installed, not on PATH, or not executable in the shell/environment colima runs from. Also triggered via app.Kubernetes() when kubectl is absent.","commonSituations":"Fresh machine where the docker CLI was never installed (only Docker Desktop was assumed); brew formula unlinked or /opt/homebrew/bin missing from PATH in launchd/CI contexts; choosing containerd or incus runtime without the corresponding client installed.","solutions":["Install the matching client for the runtime named in the error, e.g. `brew install docker` (docker CLI), or the containerd/incus/kubectl client","Verify from the same shell/environment colima uses: `docker version` (or `ctr version`, `kubectl version --client`) succeeds","Fix PATH so the binary resolves (check /opt/homebrew/bin and /usr/local/bin)","Alternatively switch to a runtime whose client is installed: `colima start --runtime <installed-runtime>`"],"exampleFix":"// before\nenv, err := c.containerEnvironment(runtime)\nif err != nil { return err } // 'dependency check failed for docker: ...'\n\n// after\nimport \"os/exec\"\nif _, err := exec.LookPath(\"docker\"); err != nil {\n    return fmt.Errorf(\"docker CLI missing: install with `brew install docker` before continuing\")\n}\nenv, err := c.containerEnvironment(runtime)","handlingStrategy":"validation","validationCode":"import \"os/exec\"\n\nclientForRuntime := map[string]string{\n    \"docker\": \"docker\", \"containerd\": \"ctr\", \"kubernetes\": \"kubectl\",\n}\nif bin, ok := clientForRuntime[runtime]; ok {\n    if _, err := exec.LookPath(bin); err != nil {\n        return fmt.Errorf(\"%s CLI not installed; install it first (e.g. brew install %s)\", runtime, bin)\n    }\n}","typeGuard":null,"tryCatchPattern":"if _, err := c.containerEnvironment(runtime); err != nil {\n    if strings.HasPrefix(err.Error(), \"dependency check failed\") {\n        // host client missing: point user to install the CLI named in the error\n    }\n    return err\n}","preventionTips":["Install the container client before the first `colima start` (brew install docker for the CLI-only setup)","In launchd/CI contexts, verify PATH contains /opt/homebrew/bin and /usr/local/bin","Verify with `docker version` (or ctr/kubectl) in the same shell that launches colima"],"tags":["dependency","host","docker","kubectl","installation","go"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}