Skip to content
Latchkey

Chocolatey "choco install failed" in CI

A choco install step exited non-zero. Chocolatey downloads installers over the network, so failures range from a transient download error to a bad package name or checksum mismatch.

What this error means

choco prints "The install of <pkg> was NOT successful" and exits non-zero, failing the step. It can be intermittent when the cause is a network or community-repo blip, or deterministic for a wrong name.

cmd
Progress: Downloading mytool 1.2.3...
ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for
url 'https://.../mytool.zip'.
The install of mytool was NOT successful.
Chocolatey installed 0/1 packages. 1 packages failed.

Common causes

Transient download or community-repo failure

Chocolatey fetches binaries at install time. A timeout, rate limit, or temporary 5xx from the source URL makes the install fail through no fault of the package.

Wrong package id or unavailable version

A misspelled id or a pinned version that was unlisted yields a hard, repeatable failure.

Checksum mismatch

If the upstream binary changed, the recorded checksum no longer matches and choco aborts.

How to fix it

Add retries and a longer timeout

Make transient download failures recover instead of failing the job.

cmd
choco install mytool -y --no-progress `
  --execution-timeout=600 `
  --ignore-package-exit-codes=0

Verify the package id and pin a known version

Confirm the exact id and a version that is still listed.

cmd
choco search mytool --exact
choco install mytool --version=1.2.3 -y

How to prevent it

  • Transient choco download failures are common; on Latchkey managed runners self-healing auto-retries transient install failures so a one-off network blip does not fail the job. Pin package versions and add a retry to harden the step. Windows minutes bill at roughly 2x Linux, so install only what the Windows job truly needs.

Frequently asked questions

What causes ""choco install" failed"?
Chocolatey fetches binaries at install time. A timeout, rate limit, or temporary 5xx from the source URL makes the install fail through no fault of the package.
How do I fix "choco install" failed?
Make transient download failures recover instead of failing the job.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card