{"record":{"id":"6e1748938d6dd24d","repo":"hashicorp/packer","slug":"no-release-version-found-for-constraints-q","errorCode":null,"errorMessage":"no release version found for constraints: %q","messagePattern":"no release version found for constraints: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/plugin-getter/plugins.go","lineNumber":952,"sourceCode":"\t\t\t\t\t\tlog.Printf(\"[WARNING] %v, ignoring\", err)\n\t\t\t\t\t\tos.Remove(outputFileName)\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\t// Success !!\n\t\t\t\t\treturn &Installation{\n\t\t\t\t\t\tBinaryPath: strings.ReplaceAll(outputFileName, \"\\\\\", \"/\"),\n\t\t\t\t\t\tVersion:    \"v\" + version.String(),\n\t\t\t\t\t}, nil\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(versions) == 0 {\n\t\tif errs.Len() == 0 {\n\t\t\terr := fmt.Errorf(\"no release version found for constraints: %q\", pr.VersionConstraints.String())\n\t\t\terrs = multierror.Append(errs, err)\n\t\t}\n\t\treturn nil, errs\n\t}\n\n\tif errs.ErrorOrNil() == nil {\n\t\terr := fmt.Errorf(\"could not find a local nor a remote checksum for plugin %q %q\", pr.Identifier, pr.VersionConstraints)\n\t\terrs = multierror.Append(errs, err)\n\t}\n\terrs = multierror.Append(errs, fmt.Errorf(\"could not install any compatible version of plugin %q\", pr.Identifier))\n\treturn nil, errs\n}\n\nfunc 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}","sourceCodeStart":934,"sourceCodeEnd":970,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/plugin-getter/plugins.go#L934-L970","documentation":"InstallLatest iterated all available releases (remote listing plus local fallback) and found no version satisfying the requirement's VersionConstraints. Thrown when the `versions` slice is empty and no other error was recorded; the constraint string is quoted in the message.","triggerScenarios":"required_plugins constraint in the HCL template (e.g. `version >= \"1.2.0\"`) matches none of the plugin's published GitHub releases, or the plugin identifier has no releases at all.","commonSituations":"Typos or overly tight version constraints; requesting a version that only exists as a pre-release which the getter skips; plugin renamed/moved on GitHub so the release listing is empty; offline or proxied environment where release listing fails silently and local copies don't match the constraint.","solutions":["Loosen the required_plugins version constraint in the .pkr.hcl (e.g. `version >= \"1.0.0\"`)","Run `packer plugins installed` / check GitHub releases for the plugin to see which versions actually exist","Check for pre-release-only matches and pin an explicit released version","Verify the plugin source identifier (hostname/namespace/name) is correct","Fix network/proxy access to github.com if release listing failed"],"exampleFix":"// before\npacker {\n  required_plugins {\n    amazon = { version = \"= 9.9.9\", source = \"github.com/hashicorp/amazon\" }\n  }\n}\n// after\npacker {\n  required_plugins {\n    amazon = { version = \">= 1.2.0\", source = \"github.com/hashicorp/amazon\" }\n  }\n}","handlingStrategy":"validation","validationCode":"// check the constraint resolves against real releases before init\n// e.g. curl https://api.github.com/repos/hashicorp/packer-plugin-amazon/tags\n// and confirm the required version exists and is not pre-release-only\nrequired := `version >= \"1.2.0\"`\nif !anyReleaseSatisfies(\"github.com/hashicorp/amazon\", required) {\n    return fmt.Errorf(\"constraint %q has no matching release\", required)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify plugin identifiers and versions against the plugin's GitHub releases page","Use range constraints (>= x.y) rather than exact pins of unreleased versions","Remember pre-release tags are skipped by the getter","Pin constraints after checking `packer plugins installed` output"],"tags":["plugin-install","version-constraint","packer","hcl2"],"backgroundTag":"no-matching-version","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"}