{"record":{"id":"87cddbb90a33ebda","repo":"kubernetes/kops","slug":"error-fetching-the-list-of-available-packages-v","errorCode":null,"errorMessage":"error fetching the list of available packages: %v:\n%s","messagePattern":"error fetching the list of available packages: (.+?):\n(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/nodetasks/package.go","lineNumber":341,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tpkgs = append(pkgs, e.Name)\n\t\t}\n\n\t\tenv := os.Environ()\n\t\tif d.IsDebianFamily() {\n\t\t\tenv = append(env, \"DEBIAN_FRONTEND=noninteractive\")\n\t\t}\n\n\t\t// If the package manager update was less than 10 minutes ago, skip updating the package list.\n\t\tif d.IsDebianFamily() && time.Since(packageManagerLastUpdated) > 10*time.Minute {\n\t\t\tklog.Infof(\"Running command apt-get update\")\n\t\t\tcmd := exec.Command(\"apt-get\", \"update\")\n\t\t\tcmd.Env = env\n\t\t\toutput, err := cmd.CombinedOutput()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error fetching the list of available packages: %v:\\n%s\", err, string(output))\n\t\t\t}\n\t\t\t// Successful package list update, updating the last updated time.\n\t\t\tpackageManagerLastUpdated = time.Now()\n\t\t}\n\n\t\tvar args []string\n\t\tif d.IsDebianFamily() {\n\t\t\targs = []string{\"apt-get\", \"install\", \"--yes\", \"--no-install-recommends\"}\n\t\t} else if d.IsRHELFamily() {\n\n\t\t\tif d.HasDNF() {\n\t\t\t\targs = []string{\"/usr/bin/dnf\", \"install\", \"-y\", \"--setopt=install_weak_deps=False\"}\n\t\t\t} else {\n\t\t\t\targs = []string{\"/usr/bin/yum\", \"install\", \"-y\"}\n\t\t\t}\n\t\t} else {\n\t\t\treturn fmt.Errorf(\"unsupported package system\")\n\t\t}","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/nodetasks/package.go#L323-L359","documentation":"Error \"error fetching the list of available packages: %v:\n%s\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/nodeup/nodetasks/package.go:341 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}