jdx/mise · error

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

Error message

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

What it means

AurManager::install() rejects any request whose PackageRequest carries a version because AUR helpers (yay/paru) can only build the latest upstream package — there is no versioned artifact to pin. If any package in the batch has `version.is_some()`, mise bails before invoking the helper. supports_version_pins() also reports false for this manager.

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 afd2eddd3a)

Solutions

  1. Remove the version pin and install the AUR package unversioned: `mise install aur:foo` (the helper builds the latest upstream release).
  2. If a specific version is mandatory, install it outside mise (e.g. `paru -S foo`, or build the old PKGBUILD from the AUR git history) and mark it as installed.
  3. If you need pinning, switch the tool to a backend that supports it (github:/aqua: releases, cargo:, etc.) instead of aur:.

Example fix

# before (.mise.toml)
[tools]
"aur:lazygit" = "0.42.0"

# after
[tools]
"aur:lazygit" = "latest"   # or omit the version entirely; use github: for pins
Defensive patterns

Strategy: validation

Validate before calling

// reject AUR version pins in config before invoking mise
function assertNoAurPins(tools) {
  for (const [name, version] of Object.entries(tools)) {
    if (name.startsWith('aur:') && version && !['latest', '*'].includes(version)) {
      throw new Error(`AUR package ${name} cannot be pinned (got ${version}); drop the pin or use github:`);
    }
  }
}

Type guard

function isAurPinRequest(req: { name: string; version?: string | null }) {
  return req.name.startsWith('aur:') && req.version != null;
}

Try / catch

try {
  await mise.install('aur:lazygit@0.42.0');
} catch (err) {
  if (err instanceof Error && err.message.includes("cannot install a pinned version")) {
    // fall back: unpin for AUR, or route to a pin-capable backend
    await mise.install('github:cli/cli');
  } else throw err;
}

Prevention

When it happens

Trigger: Calling mise install/upgrade for an `aur:` package with a version, e.g. `mise install aur:foo@1.2.3` or a mise.toml entry like `aur = "foo@1.2.3"` — any pin on an AUR-backed package hits this bail.

Common situations: Copying an npm/go-style pinned config to an AUR package, trying to roll back an AUR package to an older version, or a mise.lock/`.tool-versions` entry that recorded a version for an AUR tool.

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@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/53814dce4581d08f. Report an issue: GitHub.