{"record":{"id":"61c20f9c639b9c98","repo":"GoogleContainerTools/skaffold","slug":"unable-to-find-minikube-executable-file-not-found","errorCode":null,"errorMessage":"unable to find minikube executable. File not found %s","messagePattern":"unable to find minikube executable\\. File not found (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/cluster/minikube.go","lineNumber":146,"sourceCode":"\terr = json.Unmarshal(out, &minikubeOutput)\n\tif v, ok := minikubeOutput[\"minikubeVersion\"]; ok {\n\t\tcurrentVersion, err := version.ParseVersion(v)\n\t\tif err != nil {\n\t\t\treturn semver.Version{}, err\n\t\t}\n\t\treturn currentVersion, nil\n\t}\n\treturn semver.Version{}, err\n}\n\nfunc minikubeBinary(ctx context.Context) (string, semver.Version, error) {\n\tfindOnce.Do(func() {\n\t\tfilename, err := exec.LookPath(\"minikube\")\n\t\tif err != nil {\n\t\t\tmk.err = errors.New(\"unable to lookup minikube executable. Please add it to PATH environment variable\")\n\t\t}\n\t\tif _, err := os.Stat(filename); os.IsNotExist(err) {\n\t\t\tmk.err = fmt.Errorf(\"unable to find minikube executable. File not found %s\", filename)\n\t\t}\n\t\tmk.path = filename\n\t\tif v, err := GetCurrentVersionFunc(ctx); err != nil {\n\t\t\tmk.err = versionErr{err: err}\n\t\t} else {\n\t\t\tmk.version = v\n\t\t}\n\t})\n\n\treturn mk.path, mk.version, mk.err\n}\n\ntype versionErr struct {\n\terr error\n}\n\nfunc (v versionErr) Error() string {\n\treturn v.err.Error()","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/cluster/minikube.go#L128-L164","documentation":"Inside FindMinikubeBinary's once-initialization, exec.LookPath('minikube') failing, or the looked-up file not existing on disk, sets mk.err to this message. Later calls surface it. Note LookPath returns an empty string on failure, so a failed lookup typically produces the first error, and a stale/nonexistent path produces this one.","triggerScenarios":"The minikube executable is not on PATH (LookPath fails and the empty/stat check path is taken), or the resolved path no longer exists when os.Stat runs.","commonSituations":"Fresh machine without minikube; minikube removed after cluster creation; PATH not including ~/go/bin or a custom install dir; CI container images lacking minikube.","solutions":["Install minikube (brew install minikube or the curl -LO install script)","Add the install directory to PATH: export PATH=$PATH:~/go/bin or wherever minikube lives","Verify with `which minikube` / `minikube version`"],"exampleFix":"// before\n$ which minikube\n(not found)\n// after\nbrew install minikube\nexport PATH=\"$(brew --prefix)/bin:$PATH\"","handlingStrategy":"validation","validationCode":"sh -c 'command -v minikube >/dev/null 2>&1 || { echo \"install minikube first\"; exit 1; }'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Add minikube installation to environment/bootstrap scripts","Include ~/go/bin or Homebrew bin in PATH for CI and shells","Check `which minikube` after machine or container rebuilds"],"tags":["minikube","binary","path","environment"],"backgroundTag":"executable-not-found","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}