Skip to content

rustc version mismatches #4

@local-optimum

Description

@local-optimum

Hey folks. Whenever I try to npm run anchor build i get a variation of the following error:

error: package solana-program v1.18.26cannot be built because it requires rustc 1.75.0 or newer, while the currently active rustc version is 1.68.0-dev Either upgrade to rustc 1.75.0 or newer, or use cargo update -p solana-program@1.18.26 --precise ver whereveris the latest version ofsolana-program supporting rustc 1.68.0-dev

My rustc versions is latest stable but I've also tried specifying exactly 1.75.0, I've tried upgrading cargo, I've tried downgrading cargo to 0.29.0, I've tried creating a rust-toolchain.toml to force it, i've cleaned and rebuilt over and over again and it just will not work.

If I could find some combination of version numbers for these things that worked I would love to propose a fix but I'm lost at this point. Not being able to build the default app in the documentation is a real pain.

I don't know if it's to do with the fact that it also won't build if the version of the Cargo.lock file is set to 4 and I have to edit that to 3 to get the build to start (this was on 0.30.0)? This error throws before the rust one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions