filecoin-project / lotus-docs

Documentation for Lotus
https://lotus.filecoin.io
29 stars 83 forks source link

Create KB-article about rustup compile error #723

Open rjan90 opened 6 months ago

rjan90 commented 6 months ago

Some users are encountering a build error like this:

error: failed to select a version for the requirement `fvm_shared = "=3.6.0"`
candidate versions found which didn't match: 2.6.0, 2.5.0, 2.4.0, ...
location searched: crates.io index
required by package `filcrypto v0.7.5 (/home/vit/lotus/extern/filecoin-ffi/rust)`
+ rm -f /home/vit/temp/tmp.AbKv4qKulH
make[1]: *** [Makefile:14: .install-filcrypto] Error 101
make[1]: Leaving directory '/home/vit/lotus/extern/filecoin-ffi'
make: *** [Makefile:41: build/.filecoin-install] Error 2
install -C ./lotus /usr/local/bin/lotus
install: cannot stat './lotus': No such file or directory
make: *** [Makefile:127: install-daemon] Error 1

Create a kb-article explaining how this can be fixed by running 'rustup update'

Stebalien commented 6 months ago

That's kind of odd... We specify the rust version in rust-toolchain.toml, so we should always build with the correct version.

Do you mean cargo update? If so, IMO, the best solution is git reset --hard (revert accidental changes to the Cargo.lock file).