Jguer/yay · error
%w: %s %s
Error message
%w: %s %s
What it means
This error is raised by the yay/AUR helper sync flow when one or more requested packages could not be resolved in any source (repos, AUR, or local deps). During dependency-graph construction, each unresolved package is marked with dep.InstallInfo.Source == dep.Missing; the sync code walks the topologically sorted graph and wraps each such package in an error joined onto the sentinel ErrPackagesNotFound with the package name and missing version. The joined error is returned before any install operation runs, so nothing is installed when it appears.
Solutions
- Run `pacman -Sy` (or `yay -Sy`) to refresh the sync database, then retry — stale databases are the most common cause.
- Verify the exact package name with `yay -Ss <name>` or on the AUR web search; correct typos or use a renamed/replacement package.
- If a dependency version is missing, check the AUR page for the package and install an alternate or AUR-only provider, or update the PKGBUILD dependency.
- Remove the unavailable package from your target list or from the package that requires it (or use --assume-installed for build-time deps you satisfy manually).
- Check that all needed repos are enabled in pacman.conf and mirrors are up to date.
Example fix
// before (user command that fails) yay -S my-packge // after typo corrected: yay -S my-package
Defensive patterns
Strategy: try-catch
Validate before calling
// Before invoking the sync operation, pre-check each target:
for _, pkg := range targets {
if _, err := searchLocalAndRemote(pkg); err != nil {
fmt.Printf("skipping unknown package: %s\n", pkg)
}
} Type guard
func isPackagesNotFound(err error) bool {
return errors.Is(err, ErrPackagesNotFound)
} Try / catch
if err := runSync(ctx, args); err != nil {
if isPackagesNotFound(err) {
// joined error lists every missing "name version"
for _, missing := range extractMissingPackages(err) {
log.Printf("not found: %s", missing)
}
return nil // degrade gracefully instead of failing whole batch
}
return err
} Prevention
- Refresh the package database before installs (sync db first).
- Validate package names against repo/AUR search before passing them as targets.
- Pin or verify dependency versions exist before building packages that require them.
- Handle ErrPackagesNotFound with errors.Is so individually missing packages don't abort the entire batch.
When it happens
Trigger: Running a sync/install/upgrade command (e.g. `yay -S <pkg>` or `yay -Su`) where a target or dependency is not found in the repos or AUR, or where the version constraint of a missing dependency (ii.Version) cannot be satisfied, so dep.Missing is recorded in the dependency graph.
Common situations: Typo in a package name; package removed or renamed from the AUR or repos; outdated local sync database (no -Sy refresh); dependency version requirement that no published package satisfies; a foreign/aur dependency dropped by its maintainer; restricted repos not enabled on the system.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- could not find all required packages
- only one operation may be used at a time
- failed to parse
- error resetting
- : please set AUR_USERNAME and AUR_PASSWORD environment…
AI-assisted analysis of Jguer/yay@328f4b4939 (2026-09-07).
Data as JSON: /api/errors/d4e19f8a05b16f5d.
Report an issue: GitHub.
Appendix: source
Thrown at sync.go:82
graph, cmdArgs.ExistsDouble("u", "sysupgrade"),
func(*upgrade.Upgrade) bool { return true })
if errSysUp != nil {
return errSysUp
}
upService.AURWarnings.Print()
excluded, errSysUp = upService.UserExcludeUpgrades(graph)
if errSysUp != nil {
return errSysUp
}
}
opService := sync.NewOperationService(ctx, dbExecutor, run)
var errs []error
targets := graph.TopoSortedLayers(func(s string, ii *dep.InstallInfo) error {
if ii.Source == dep.Missing {
errs = append(errs, fmt.Errorf("%w: %s %s", ErrPackagesNotFound, s, ii.Version))
}
return nil
})
if err := errors.Join(errs...); err != nil {
return err
}
return opService.Run(ctx, run, cmdArgs, targets, excluded)
}
func earlyRefresh(ctx context.Context, cfg *settings.Configuration, cmdBuilder exe.ICmdBuilder, cmdArgs *parser.Arguments) error {
arguments := cmdArgs.Copy()
if cfg.CombinedUpgrade {
arguments.DelArg("u", "sysupgrade")
}
arguments.DelArg("s", "search")
arguments.DelArg("i", "info")View on GitHub (pinned to 328f4b4939)