{"record":{"id":"905b4211360c1342","repo":"hashicorp/packer","slug":"failed-to-describe-plugin-binary-q-s","errorCode":null,"errorMessage":"failed to describe plugin binary %q: %s","messagePattern":"failed to describe plugin binary %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/plugin-getter/plugins.go","lineNumber":984,"sourceCode":"func GetPluginDescription(pluginPath string) (pluginsdk.SetDescription, error) {\n\tout, err := exec.Command(pluginPath, \"describe\").Output()\n\tif err != nil {\n\t\treturn pluginsdk.SetDescription{}, err\n\t}\n\n\tdesc := pluginsdk.SetDescription{}\n\terr = json.Unmarshal(out, &desc)\n\n\treturn desc, err\n}\n\n// checkVersion checks the described version of a plugin binary against the requested version constriant.\n// A ContinuableInstallError is returned upon a version mismatch to indicate that the caller should try the next\n// available version. A PrereleaseInstallError is returned to indicate an unsupported version install.\nfunc checkVersion(binPath string, identifier string, version *goversion.Version) error {\n\tdesc, err := GetPluginDescription(binPath)\n\tif err != nil {\n\t\terr := fmt.Errorf(\"failed to describe plugin binary %q: %s\", binPath, err)\n\t\treturn &ContinuableInstallError{Err: err}\n\t}\n\tdescVersion, err := goversion.NewSemver(desc.Version)\n\tif err != nil {\n\t\terr := fmt.Errorf(\"invalid self-reported version %q: %s\", desc.Version, err)\n\t\treturn &ContinuableInstallError{Err: err}\n\t}\n\tif descVersion.Core().Compare(version.Core()) != 0 {\n\t\terr := fmt.Errorf(\"binary reported version (%q) is different from the expected %q, skipping\", desc.Version, version.String())\n\t\treturn &ContinuableInstallError{Err: err}\n\t}\n\tif version.Prerelease() != \"\" {\n\t\treturn &PrereleaseInstallError{\n\t\t\tPluginSrc: identifier,\n\t\t\tErr:       errors.New(\"binary reported a pre-release version of \" + version.String()),\n\t\t}\n\t}\n\t// Since only final releases can be installed remotely, a non-empty prerelease version","sourceCodeStart":966,"sourceCodeEnd":1002,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/plugin-getter/plugins.go#L966-L1002","documentation":"checkVersion runs the freshly downloaded plugin binary with `describe` to read its self-reported version; if that command fails, this ContinuableInstallError is returned so InstallLatest skips to the next candidate version. The binary couldn't be executed or produced no usable describe output.","triggerScenarios":"GetPluginDescription(binPath) fails — binary not executable (download lost the exec bit / noexec mount), corrupted/truncated download, wrong architecture for the host, or the plugin crashes on `describe`.","commonSituations":"Downloading a darwin/windows binary on linux due to mislabeled release assets; /home or /tmp mounted noexec; partial download from a flaky network; malicious/corrupted binary that fails to start.","solutions":["Try running the binary directly: <plugin-path> describe — the OS error names the real cause","Check the binary architecture matches the host (file <plugin-path>) and re-init to re-download the right asset","Remount or relocate the plugin directory if it's on a noexec filesystem","Delete the plugin from ~/.packer.d/plugins and re-run `packer init` for a clean download","Update to a packer/plugin release where assets are correctly labeled for your platform"],"exampleFix":"// before (noexec /tmp)\n$ packer init .\nError: failed to describe plugin binary \"/tmp/packer-plugin...\": fork/exec ...: permission denied\n// after\nexport PACKER_PLUGIN_PATH=$HOME/.packer.d  # on exec-mounted fs\npacker init .","handlingStrategy":"validation","validationCode":"// after a failure, validate the binary can execute at all\nimport \"os/exec\"\nout, err := exec.Command(binPath, \"describe\").CombinedOutput()\nif err != nil {\n    // e.g. fork/exec: permission denied => noexec mount or missing exec bit\n    // e.g. exec format error => wrong architecture\n    return fmt.Errorf(\"plugin binary %s not runnable: %v: %s\", binPath, err, out)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep plugin directories off noexec-mounted filesystems","Match OS/arch to the release asset; don't force-download cross-platform assets","Delete and re-download binaries after interrupted installs","If using a ContinuableInstallError, log the skipped version and let InstallLatest try the next one"],"tags":["plugin-install","exec","binary","packer"],"backgroundTag":"plugin-binary-not-executable","analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}