Rustup installation step is missing in hello world tutorial #348
Description
Hi, I just want to leave a comment here thinking that it may help to make the onboarding process easier for other new comers to the solana world like me. When I tried to follow instructions on README.md for this hello world program, I noticed that I wasn't able to run it. Because correct rustup, cargo version weren't installed on my system. That's why I am writing the errors I came accross and then how I fixed it as follows. If it is possible to include rustup installation steps on README.md, I think it would be more smooth experience for the people who would like to test solana tools.
After running npm run build:program-rust
I came accross with following issue:
> [email protected] build:program-rust
> cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program
sh: 1: cargo: not found
I fixed this by installing rustup from snap with
sudo snap install rustup --classic
but rustup version on snap was out of date for solana
> [email protected] build:program-rust
> cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program
error: no override and no default toolchain set
and to fix this, I had to run
rustup toolchain add 1.53
and the issue is resolved.
reference: https://stackoverflow.com/questions/68599747/rust-solana-build-error-no-such-subcommand-bpf