Skip to content
Latchkey

Rust "toolchain `x` is not installed" in CI

A command requested a specific toolchain (a channel like nightly, or a pinned version) that rustup does not have installed. rustup refuses to run rather than silently picking another toolchain.

What this error means

cargo or rustup fails with error: toolchain '<name>' is not installed. It happens when a +nightly invocation, a rust-toolchain.toml, or an override names a channel the runner never installed.

rustup output
error: toolchain 'nightly-x86_64-unknown-linux-gnu' is not installed
help: run `rustup toolchain install nightly-x86_64-unknown-linux-gnu` to install it

Common causes

Requested channel never installed

A cargo +nightly ..., a rust-toolchain.toml, or a rustup override points at a toolchain that was never installed on this runner.

Pinned version absent from the image

A pinned version (e.g. 1.79.0) is requested but the runner only has stable. rustup has nothing matching the exact name.

How to fix it

Install the requested toolchain

rustup’s own help line names the exact install command.

Terminal
rustup toolchain install nightly
# or a pinned version
rustup toolchain install 1.79.0

Request it via the setup action

Let the toolchain action install the channel your project needs.

.github/workflows/ci.yml
- uses: dtolnay/rust-toolchain@nightly
# or pinned:
- uses: dtolnay/rust-toolchain@1.79.0

How to prevent it

  • Install every channel your build references (including nightly for +nightly steps).
  • Use a toolchain action that installs the channel automatically.
  • Keep rust-toolchain.toml in sync with what CI installs.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →