GoogleContainerTools/skaffold · error
unable to find minikube executable. File not found %s
Error message
unable to find minikube executable. File not found %s
What it means
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.
Source
Thrown at pkg/skaffold/cluster/minikube.go:146
err = json.Unmarshal(out, &minikubeOutput)
if v, ok := minikubeOutput["minikubeVersion"]; ok {
currentVersion, err := version.ParseVersion(v)
if err != nil {
return semver.Version{}, err
}
return currentVersion, nil
}
return semver.Version{}, err
}
func minikubeBinary(ctx context.Context) (string, semver.Version, error) {
findOnce.Do(func() {
filename, err := exec.LookPath("minikube")
if err != nil {
mk.err = errors.New("unable to lookup minikube executable. Please add it to PATH environment variable")
}
if _, err := os.Stat(filename); os.IsNotExist(err) {
mk.err = fmt.Errorf("unable to find minikube executable. File not found %s", filename)
}
mk.path = filename
if v, err := GetCurrentVersionFunc(ctx); err != nil {
mk.err = versionErr{err: err}
} else {
mk.version = v
}
})
return mk.path, mk.version, mk.err
}
type versionErr struct {
err error
}
func (v versionErr) Error() string {
return v.err.Error()View on GitHub (pinned to a1189de023)
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`
Example fix
// before $ which minikube (not found) // after brew install minikube export PATH="$(brew --prefix)/bin:$PATH"
Defensive patterns
Strategy: validation
Validate before calling
sh -c 'command -v minikube >/dev/null 2>&1 || { echo "install minikube first"; exit 1; }' Prevention
- 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
When it happens
Trigger: 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.
Common situations: Fresh machine without minikube; minikube removed after cluster creation; PATH not including ~/go/bin or a custom install dir; CI container images lacking minikube.
Related errors
- unable to lookup minikube executable. Please add it to PATH
- getting minikube executable: %w
- executing minikube command: %w
- no 'git' program on path: %w
- getting minikube profiles: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/61c20f9c639b9c98.
Report an issue: GitHub.