[SOLVED] Solana Course spl-token-install error

Hi all,
I’m current doing the Solana Programming 101 course and run into the following problem. When I run the following code

cargo install spl-token-cli

it gives me the following error

I’ve currently got solana-cli 1.14.21 install, and my window machine is running the latest ubuntu. and also I’ve got all the toolchain installed as well.

so I can’t seems to figure out what cause the issue.

Hi @Philip_Wong

Have you tried the fix suggested in the terminal?

I did, it didn’t helped. but luckily after digging through some more forum, I found another thread that had a similar issue and manage to use the same process to solve it.
for future reference to others that might ran into the same issue (unless the issue had been rectify and fixed), you need to install some legacy/ older library , which may or may not be supported but still works.

Also make sure you have the toolchain up-to-date, that was another issue that I ran into and manage to solve it, after crawling through some old forum threads

1 Like

Hello Philip!

So I have the same problem, would you mind posting the sources that helped you fix the issue or give me a few more hints on how to fix it.

Thank you so much

Hey Gerardo,

My subscription went out back in August, so I can’t remember exactly which course is the solana course.
Is it the one with Rust? the Solana course might be one of the course that I’ve started but ran out of time to finish before the subscription, so if you can give me more info I can look at the github that I created when I was learning and see if I can find any notes I’ve written down to help you

from the response I wrote back in July 17, try to update your toolchain first, I kind of remember it takes multiple steps to do it, and then scroll through your error list to see if it mention anything about an outdate library

  1. Install protoc using a package manager :
  • Debian/Ubuntu :
sudo apt-get install protobuf-compiler
  • macOS :
brew install protobuf

I am facing this issue too but have no ideia how I can solve it, i think I have all installation done, but not sure. I have to error message.

error: failed to run custom build command for `solana-svm v2.0.13`

Caused by:
  process didn't exit successfully: `/var/folders/40/tr3zfn414wx2lvsnt1zzrl_r0000gn/T/cargo-install3loxMk/release/build/solana-svm-e96927bbf2fb82da/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION
  cargo:rerun-if-changed=proto/context.proto
  cargo:rerun-if-changed=proto/invoke.proto
  cargo:rerun-if-changed=proto/sysvar.proto
  cargo:rerun-if-changed=proto/txn.proto

  --- stderr
  thread 'main' panicked at /Users/oficinadoras/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-build-0.11.9/src/lib.rs:1457:10:
  Could not find `protoc` installation and this build crate cannot proceed without
      this knowledge. If `protoc` is installed and this crate had trouble finding
      it, you can set the `PROTOC` environment variable with the specific path to your
      installed `protoc` binary.You could try running `brew install protobuf` or downloading it from https://github.com/protocolbuffers/protobuf/releases

  For more information: https://docs.rs/prost-build/#sourcing-protoc

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `spl-token-cli v4.1.1`, intermediate artifacts can be found at `/var/folders/40/tr3zfn414wx2lvsnt1zzrl_r0000gn/T/cargo-install3loxMk`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.Preformatted text

try uninstall the package you currently have and install a older version

1 Like

thank you, it is solved. I didn’t have the Homebrew installed. it is done