{"record":{"id":"e148cdfc6a4b5d2f","repo":"gravitational/teleport","slug":"no-binaries-available-to-link","errorCode":null,"errorMessage":"no binaries available to link","messagePattern":"no binaries available to link","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/autoupdate/agent/updater.go","lineNumber":350,"sourceCode":"\tUnlinkSystem(ctx context.Context) error\n\t// List the installed revisions of Teleport.\n\tList(ctx context.Context) (revisions []Revision, err error)\n\t// Remove the Teleport agent at revision.\n\t// Remove must be idempotent.\n\tRemove(ctx context.Context, rev Revision) error\n\t// IsLinked returns true if the revision is linked to path.\n\tIsLinked(ctx context.Context, rev Revision, pathDir string) (bool, error)\n}\n\nvar (\n\t// ErrLinked is returned when a linked version cannot be operated on.\n\tErrLinked = errors.New(\"version is linked\")\n\t// ErrNotSupported is returned when the operation is not supported on the platform.\n\tErrNotSupported = errors.New(\"not supported on this platform\")\n\t// ErrNotAvailable is returned when the operation is not available at the current version of the platform.\n\tErrNotAvailable = errors.New(\"not available at this version\")\n\t// ErrNoBinaries is returned when no binaries are available to be linked.\n\tErrNoBinaries = errors.New(\"no binaries available to link\")\n\t// ErrFilePresent is returned when a file is present.\n\tErrFilePresent = errors.New(\"file present\")\n\t// ErrNotInstalled is returned when Teleport is not installed.\n\tErrNotInstalled = errors.New(\"not installed\")\n)\n\n// Process provides an API for interacting with a running Teleport process.\ntype Process interface {\n\t// Name of the process.\n\tName() string\n\t// Reload must reload the Teleport process as gracefully as possible.\n\t// If the process is not healthy after reloading, Reload must return an error.\n\t// If the process did not require reloading, Reload must return ErrNotNeeded.\n\t// E.g., if the process is not enabled, or it was already reloaded after the last Sync.\n\t// If the type implementing Process does not support the system process manager,\n\t// Reload must return ErrNotSupported.\n\tReload(ctx context.Context) error\n\t// Sync must validate and synchronize process configuration.","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/gravitational/teleport/blob/1283425b60ec5f60d509ba4c791183d452923ff7/lib/autoupdate/agent/updater.go#L332-L368","documentation":"ErrNoBinaries is returned by the autoupdate agent's link logic (forceLinks, tryLinks, and the local installer) when there are no binaries available to link into the target install directory. It surfaces when the staged package's binary directory is missing/empty or when zero binaries were successfully linked, causing the operation to revert.","triggerScenarios":"installer.go:752 — os.ReadDir(srcBinDir) returns os.ErrNotExist (staged version directory has no bin dir); installer.go:798 — the link loop completed but linked == 0 binaries.","commonSituations":"A corrupted or partially-downloaded staged package (version directory extracted without binaries); pointing the updater at a package variant with no binaries for the architecture; cleaning up staging dirs while an install is in flight.","solutions":["Re-download/re-stage the target version so the package's bin directory is populated.","Verify the staged directory exists and contains binaries: check the versions dir under the agent's package root for a bin/ folder.","Ensure the downloaded package matches the host architecture/OS (wrong-arch packages may extract without usable binaries).","Retry the link operation; the installer reverts state on this error so a clean retry is safe."],"exampleFix":"// before\nrevert, err := installer.tryLink(ctx)\nif err != nil {\n    return err\n}\n// after\nrevert, err := installer.tryLink(ctx)\nif err != nil {\n    if errors.Is(err, autoupdate.ErrNoBinaries) {\n        log.WarnContext(ctx, \"no binaries staged; re-fetching package\")\n        _ = installer.fetchPackage(ctx, targetVersion) // re-stage then retry\n    }\n    return trace.Wrap(err)\n}","handlingStrategy":"retry","validationCode":"entries, err := os.ReadDir(filepath.Join(stageDir, \"bin\"))\nif os.IsNotExist(err) || len(entries) == 0 {\n    // re-stage package before attempting link\n}","typeGuard":"func IsNoBinaries(err error) bool { return errors.Is(err, autoupdate.ErrNoBinaries) }","tryCatchPattern":"revert, err := installer.tryLink(ctx)\nif errors.Is(err, autoupdate.ErrNoBinaries) {\n    _ = revert(ctx)\n    _ = installer.fetchPackage(ctx, targetVersion) // re-stage and retry once\n}","preventionTips":["Verify staged package integrity (bin/ populated) before linking","Match package architecture to host arch when downloading","Avoid deleting staging directories while installs are in progress"],"tags":["autoupdate","package-install","missing-files","sentinel-error"],"backgroundTag":"missing-binary","analyzedSha":"1283425b60ec5f60d509ba4c791183d452923ff7","analyzedAt":"2026-09-02T04:06:41.601Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}