Rust Toolchains and how to update them

I’m trying to write a Solana program in native rust using the solana-program crate (currently in version 2.1.6)

However, whenever i run

cargo build-sbf

it give me the following error:

error: package solana-program v2.1.6 cannot be built because it
requires rustc 1.79.0 or newer, while the currently active rustc
version is 1.75.0-dev

I know that it’s not using my active rust tool chain (that’s up to date) but it creates a separate “solana” toolchain. However, even if I set that as the active one and update it, it doesn’t seem to fix my issue.

I’ve uninstalled and reinstalled everything from my local rust versions to the agave cli. Can’t get rid of this error.

I temporarily fixed it by using solana-program is version 1.18 but that’s not a long-term solution.

Could somebody please explain to me how those rust toolchains work, when exactly the “solana” toolchain is added, which script is responsible for that, and how i can update the rustc of that toolchain to a newer version.

Thanks 🙂

Related Articles

how to Filter Raydium Pool with geyser

is there anyone know how to filter the raydium pool newly created pairs with geyser python, transaction { signatures: “G337364220355377210257334275137736315314$34692025425535132427620505330]f324265370Z360f27125330122321w254315351Q227 31DJ357e6243203255CL202312r27200” message { header {…

Responses

Your email address will not be published. Required fields are marked *