Rust 进程使用 GitHub 操作失败,退出代码为 101

标签 rust github-actions rust-cargo

代码在我的本地机器上运行良好,没有出现错误。
但是当我推送到 GitHub 时,构建失败了。
这是我的工作流文件块:

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
这是错误。
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
在此之前,所有依赖项都已安装。您可能会看到整个日志 here

最佳答案

这是最近每晚的一个 cargo 错误: https://github.com/rust-lang/cargo/issues/8557 。这是由 https://github.com/rust-lang/rust/pull/73265 中的目录布局更改引起的。

关于Rust 进程使用 GitHub 操作失败,退出代码为 101,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63151602/

相关文章:

rust - `move occurs due to use in generator` 错误是什么意思?

multithreading - 我如何使用 Rayon 将大范围拆分为多个范围 block ,并让每个线程在一个 block 中找到?

php - 如何使用 github action 部署 Laravel 应用程序

rust - 如何发布测试版的 crate 以进行有限的公开测试?

rust - 如何删除使用 cargo install 安装的二进制文件?

winapi - 如何将 RawWindowHandle::Windows 传递给 winapi::winuser::SetWindowPos

Rust 中类似 Golang 的延迟

kotlin - 如何在 GitHub Actions 上运行 Kotlin 脚本?

github - 有没有办法在运行 gh 操作时获取工作流程 ID

python - 为什么 ANSI 转义码有时可以在 CMD 中工作