buck2 error due to mismatch in rust version

65 views Asked by At

I am trying to install buck2 on my ubuntu machine. These are the commands I ran (from buck2 site)

rustup install nightly-2023-05-28
cargo +nightly-2023-05-28 install --git https://github.com/facebook/buck2.git buck2

but I am getting this error

error: failed to run custom build command for `buck2_core v0.1.0 (/home/user/.cargo/git/checkouts/buck2-881d6af740402932/8eee9d4/app/buck2_core)`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installWwdSG1/release/build/buck2_core-9383ed164b222151/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'buck2 only works with version `rustc 1.72.0-nightly (36fb58e43 2023-06-26)` of rustc, but you are using `rustc 1.71.0-nightly (cca7ee581 2023-05-27)`. Correct version is installed automatically when `rustup` is used', app/buck2_core/build.rs:43:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
0

There are 0 answers