Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Rustup installation step is missing in hello world tutorial #348

Open
ozgunya opened this issue Oct 23, 2021 · 0 comments
Open

Rustup installation step is missing in hello world tutorial #348

ozgunya opened this issue Oct 23, 2021 · 0 comments

Comments

@ozgunya
Copy link

ozgunya commented Oct 23, 2021

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

@ozgunya ozgunya changed the title Rustup installation is missing in hello world tutorial Rustup installation step is missing in hello world tutorial Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant