cargo build-bpf error with rustc version
cargo build-bpf error with rustc version
Loading saved threads...
nova4142 · External communityPost link
External question — Solana Stack Exchange
Author: nova4142
Original post: https://solana.stackexchange.com/questions/11806
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
When I execute the command cargo build-bpf, I encounter an error. How can I resolve this issue?
error: package `libp2p-allow-block-list v0.3.0 (https://github.com/sigp/rust-libp2p/?rev=cfa3275ca17e502799ed56e555b6c0611752e369#cfa3275c)` cannot be built because it requires rustc 1.73.0 or newer, while the currently active rustc version is 1.72.0-dev Either upgrade to rustc 1.73.0 or newer, or use cargo update -p libp2p-allow-block-list@0.3.0 --precise ver where `ver` is the latest version of `libp2p-allow-block-list` supporting rustc 1.72.0-dev
solana-cli:1.18.4
rustc: 1.76.0
rustup: 1.26.0
Quote
Report
Jon C · External communityPost link
External answer — Solana Stack Exchange
Author: Jon C
Original post: https://solana.stackexchange.com/a/11876
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Similar to
https://solana.stackexchange.com/a/9799/84
: if you need to use a newer version of the Solana Rust compiler, you can use the
--tools-version
argument. In your case, you can try:
cargo build-sbf --tools-version v1.41
Quote
Report
Hurric4n3Ike · External communityPost link
External answer — Solana Stack Exchange
Author: Hurric4n3Ike
Original post: https://solana.stackexchange.com/a/15595
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
This solution Solves Everything!:
Type these in the terminal:
solana-install init 1.18.18(or latest version/version/version you’re using, mine worked with 1.18.18)
cargo add solana-program@=1.18.18
cargo update -p solana-program@1.18.18
Cargo clean
Anchor clean
Anchor build
This works because using the Solana init command above FIRST makes sure that the build tools are properly initialized.
Quote
Report
0xp3p3x0 · External communityPost link
External answer — Solana Stack Exchange
Author: 0xp3p3x0
Original post: https://solana.stackexchange.com/a/23184
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I think there is problem with your solana env path
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Solana Stack Exchange Author: Hurric4n3Ike Source score (net votes, not local likes): 0 Original post: https://solana.stackexchange.com/a/15595 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. This solution Solves Everything!: Type these in the terminal: solana-install init 1.18.18(or latest version/version/version you’re using, mine worked with 1.18.18) cargo add solana-program@=1.18.18 cargo update -p solana-program@1.18.18 Cargo clean Anchor clean Anchor build This works because using the Solana init command above FIRST makes sure that the build tools are properly initialized.
Checking account access…