asdf-vm/asdf · error
executable not found
Error message
executable not found
What it means
getExecutable returns this error when, after walking the current tool versions, no matching executable file was found for the requested command in any installed plugin/version. The process also exits with status 126 (command found but not executable/not found) after printing the message.
Source
Thrown at internal/cli/cli.go:715
logger.Printf("or add one of the following versions in your config file at %s/.tool-versions\n", currentDir)
}
for _, toolVersion := range toolVersions {
for _, version := range toolVersion.Versions {
logger.Printf("%s %s\n", toolVersion.Name, version)
}
}
}
os.Exit(126)
return executable, plugins.Plugin{}, "", err
}
if !found {
logger.Print("executable not found")
os.Exit(126)
return executable, plugins.Plugin{}, "", fmt.Errorf("executable not found")
}
return executable, plugin, version, nil
}
func anyInstalled(conf config.Config, toolVersions []toolversions.ToolVersions) bool {
for _, toolVersion := range toolVersions {
for _, version := range toolVersion.Versions {
version := toolversions.Parse(version)
plugin := plugins.New(conf, toolVersion.Name)
if installs.IsInstalled(conf, plugin, version) {
return true
}
}
}
return false
}
View on GitHub (pinned to 074a1722ca)
Solutions
- Run `asdf install` in the project directory to install missing tool versions.
- Verify the tool version is installed: `asdf list <plugin>` and check .tool-versions.
- Recreate shims after installing or changing plugins: `asdf reshim <plugin> <version>`.
- Check the executable name — the shim may exist but the binary inside the installed version has a different name; inspect the plugin's bin/ hooks.
Example fix
# before node --version # shim exists but version not installed # after asdf install nodejs 20.11.0 asdf reshim nodejs
Defensive patterns
Strategy: validation
Validate before calling
asdf list <plugin> 2>/dev/null | grep -q . || asdf install
test -x "$(asdf which <cmd>)" || { echo "<cmd> not resolvable"; exit 1; } Try / catch
if ! out=$(asdf exec <cmd> 2>&1); then echo "$out" [ "$out" = "executable not found" ] && asdf install fi
Prevention
- Run `asdf install` after editing .tool-versions
- Run `asdf reshim` after installing or removing plugins
- Verify command names with `asdf which <cmd>`
- Keep .tool-versions in sync with actually installed versions
When it happens
Trigger: Running `asdf exec <cmd>` or `asdf env <cmd>` where <cmd> does not exist in any installed version of the relevant plugin; plugin not installed for the current directory's .tool-versions; shim invoked for a tool whose executable name differs.
Common situations: Forgetting `asdf install` after adding a version to .tool-versions; a shim left over for a plugin that was removed; the plugin's bin/exec-path listing doesn't match the actual binary name; typo in the command name.
Related errors
AI-assisted analysis of asdf-vm/asdf@074a1722ca (2026-08-30).
Data as JSON: /api/errors/6e5dc908a29aaf09.
Report an issue: GitHub.