Rust process failed with exit code 101 using GitHub actions

Viewed 8773

The code runs fine in my local machine and gives no error. But when I push to GitHub, the build fails.

Here is block of my workflow file:

runs-on: ${{ matrix.platform }}
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v2
      - name: Install Rust Toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
      - name: Install `rust-src` Rustup Component
        run: rustup component add rust-src
      - name: Run `cargo check`
        uses: actions-rs/cargo@v1
        with:
          command: check

And here is the error.

error: failed to read `/usr/share/rust/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/Cargo.toml`
21
##[error]failed to read `/usr/share/rust/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/Cargo.toml`
22
Caused by:
23
  No such file or directory (os error 2)
24
##[error]The process '/usr/share/rust/.cargo/bin/cargo' failed with exit code 101

Before this all the dependencies are being installed. You may see the whole log here.

1 Answers
Related