freeCodeCamp / solana-curriculum

freeCodeCamp Solana Curriculum
BSD 3-Clause "New" or "Revised" License
130 stars 50 forks source link

[HELP]: "cargo build-sbf --sbf-out-dir=../../dist/program" returns "error: not a file: '/workspace/.local/share/solana/install/releases/1.14.7/solana-release/bin/sdk/bpf/dependencies/sbf-tools/rust/bin/rustc'" #332

Closed AkiraMatthew closed 8 months ago

AkiraMatthew commented 8 months ago

Project

Solana - Learn How to Set Up Solana by Building a Hello World Smart Contract

Lesson Number

29

Question

I'm trying to run the cargo build-sbf but it keeps triggering that there is no such file cargo build-sbf --sbf-out-dir=../../dist/program error: not a file: '/workspace/.local/share/solana/install/releases/1.14.7/solana-release/bin/sdk/bpf/dependencies/sbf-tools/rust/bin/rustc'

I have no idea what to do, I've even searched the folder to create it, but no success either.

Code and Screenshots

image

ShaunSHamilton commented 8 months ago

Hello there,

It seems like something has gone wrong with the installation of solana. Try running:

sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

Then, use the cargo build-sbf command again.

AkiraMatthew commented 8 months ago

image

Now it shows this

Downloaded tiny-bip39 v0.8.2 error: package solana-program v1.18.3 cannot be built because it requires rustc 1.72.0 or newer, while the currently active rustc version is 1.68.0-dev Either upgrade to rustc 1.72.0 or newer, or use cargo update -p solana-program@1.18.3 --precise ver where 'ver' is the latest version of 'solana-program' supporting rustc 1.68.0-dev

but is is all updated, currently when I type rustc --version, it retrieves that i'm currently in the 1.76.0 image

AkiraMatthew commented 8 months ago

managed to solve it by updating my solana CLI to the 1.18.1 BETA release solana-install init 1.18.1

Huzaifa696 commented 8 months ago

managed to solve it by updating my solana CLI to the 1.18.1 BETA release solana-install init 1.18.1

thanks, it worked for as well