jdx/mise · error

AUR helpers cannot install a pinned version

Error message

AUR helpers cannot install a pinned version ('{pkg}')

What it means

AUR helpers build packages from source at whatever version the AUR currently provides; they cannot install a specific pinned version. The AUR manager declares supports_version_pins() = false and its install() proactively rejects any PackageRequest carrying a version with this error.

Solutions

  1. Remove the version pin from the AUR package request (install unpinned)
  2. Install the pinned version via the official repos with pacman instead if it exists there
  3. Use a different manager/backend that supports version pins
  4. Freeze the version out-of-band (e.g. pin the AUR PKGBUILD in a custom repo/git checkout)

Example fix

// before
PackageRequest { name: "yay".into(), version: Some("12.3.1".into()) }
// after
PackageRequest { name: "yay".into(), version: None }
Defensive patterns

Strategy: validation

Validate before calling

if pkgs.iter().any(|p| p.version.is_some()) && manager == "aur" {
    eprintln!("strip version pins before handing requests to the AUR manager");
    pkgs.iter_mut().for_each(|p| { p.version = None; });
}

Prevention

When it happens

Trigger: Calling the AUR system package manager's install (directly or via upgrade) with a PackageRequest whose version field is Some, e.g. a bootstrap config pinning an AUR package to a version.

Common situations: User pins versions of all bootstrap packages uniformly, including AUR ones; porting an apt/brew-style pinned config to an Arch machine using the AUR manager.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/53814dce4581d08f. Report an issue: GitHub.

Appendix: source

Thrown at src/system/packages/aur.rs:180

    async fn installed(&self, pkgs: &[PackageRequest]) -> Result<Vec<PackageStatus>> {
        if pkgs.is_empty() {
            return Ok(vec![]);
        }
        Ok(resolve_foreign_packages(pkgs)
            .await?
            .into_iter()
            .map(|package| package.status)
            .collect())
    }

    fn supports_version_pins(&self) -> bool {
        false
    }

    async fn install(&self, pkgs: &[PackageRequest], opts: &InstallOpts) -> Result<()> {
        if let Some(pkg) = pkgs.iter().find(|pkg| pkg.version.is_some()) {
            bail!("AUR helpers cannot install a pinned version ('{pkg}')");
        }
        let helper = self
            .helper()
            .ok_or_else(|| eyre::eyre!(self.unavailable_reason()))?;
        let args = install_args(pkgs, opts);
        let command = std::iter::once(helper.to_string())
            .chain(args.iter().cloned())
            .collect::<Vec<_>>();
        if opts.dry_run {
            miseprintln!("{}", shell_words::join(command));
            return Ok(());
        }
        if crate::system::sudo::is_root() {
            bail!("AUR packages cannot be built as root; run mise as a non-root user");
        }
        crate::system::sudo::ensure_elevation_available(&shell_words::join(&command))?;
        let mut runner = CmdLineRunner::new(helper);
        for arg in &args {

View on GitHub (pinned to 533346cc37)