freeCodeCamp / solana-curriculum

freeCodeCamp Solana Curriculum

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: Lesson 28 can't run cargo build

mikejhale opened this issue · comments

Issue/Experience

In Lesson 28:
cargo build-sbf --sbf-out-dir=../../dist/program

Geting:
error: not a directory: '/root/.local/share/solana/install/releases/1.14.2/solana-release/bin/sdk/bpf/dependencies/sbf-tools/rust/bin'

Output of running node tooling/camper-info.js from the workspace root

INFO: Project: learn-how-to-set-up-solana-by-building-a-hello-world-smart-contract
INFO: Lesson Number: 1
INFO: Curriculum Version: 0.1.1
INFO: freeCodeCamp - Courses: freeCodeCamp.freecodecamp-courses@1.6.0
INFO: Commit: 3484c47 fix(deps): update dependency @solana/web3.js to v1.66.2
INFO: OS Info:
Architecture: x64
Platform: linux
Release: 5.4.72-microsoft-standard-WSL2
Type: Linux

What I've tried to resolve the issue:

  • upgrading to Solana 1.14.3
  • cleared ~/.cache/solana/
  • ran cargo-build-sbf vs cargo build-sbf

Hello there,

Please follow the issue guide by sharing the output of running node tooling/camper-info.js from the workspace root.

Updated the original issue.

Thank you 🙂

Your OS and architecture is the same as mine. So, I am not sure why you are encountering an issue. I am unable to reproduce any issue.

Share the output of:

ls -la ~/.rustup/toolchains/

Try running:

# ONLY IF YOU HAVE `1.14.2`
rustup toolchain link bpf ~/.local/share/solana/install/releases/1.14.2/solana-release/bin/sdk/bpf/dependencies/bpf-tools/rust
# I suspect this will also produce an error about bpf-tools/rust

ls -la ~/.rustup/toolchains/
drwxr-xr-x 3 root root 4096 Oct 24 11:18 .
drwxr-xr-x 6 root root 4096 Oct 24 11:18 ..
drwxr-xr-x 7 root root 4096 Oct 24 11:18 stable-x86_64-unknown-linux-gnu

rustup toolchain link bpf ~/.local/share/solana/install/releases/1.14.2/solana-release/bin/sdk/bpf/dependencies/bpf-tools/rust

error: not a directory: '/root/.local/share/solana/install/releases/1.14.2/solana-release/bin/sdk/bpf/dependencies/bpf-tools/rust/lib'

Thank you for trying that with me. Unfortunately, I am out of ideas, and can only suggest deleting the container, and rebuilding it from scratch.

Deleting the container and restarting the lesson from the beginning worked.