Skip to content

toolchain 'stable-x86_64-unknown-linux-gnu' may not be able to run on this system #1687

Closed
@garretwilson

Description

@garretwilson

Checklist

Describe your issue

I'm running Rust 1.87.0 on Windows 10 with the GNU toolchain.

Default host: x86_64-pc-windows-gnu
rustup home:  (redacted)\.rustup

installed toolchains
--------------------
stable-x86_64-pc-windows-gnu (active, default)
stable-x86_64-pc-windows-msvc

active toolchain
----------------
name: stable-x86_64-pc-windows-gnu
active because: it's the default toolchain
installed targets:
  x86_64-pc-windows-gnu

I updated to the latest Docker, rebooted, and verified that docker was running. I tried to follow the Getting Started steps, which sound pretty simple and straightforward, but I get an error: toolchain 'stable-x86_64-unknown-linux-gnu' may not be able to run on this system.

Because cross bills itself as "zero setup" and none of the cross instructions mentioned this error or indicated that I should add targets, it seems likely there is a problem, so I'm reporting it.

What target(s) are you cross-compiling for?

x86_64-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

0.2.5

Example

cargo install cross
cargo init --bin rust-hello-cross
cd rust-hello-cross/
docker ps -a # verify Docker is running
cross run --target aarch64-unknown-linux-gnu

I get:

error: toolchain 'stable-x86_64-unknown-linux-gnu' may not be able to run on this system
note: to build software for that platform, try `rustup target add x86_64-unknown-linux-gnu` instead
note: add the `--force-non-host` flag to install the toolchain anyway
Error:
   0: couldn't install toolchain `stable-x86_64-unknown-linux-gnu`
   1: `rustup toolchain add stable-x86_64-unknown-linux-gnu --profile minimal` failed with exit code: 1

Additional information / notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions