Solana curriculum - Hello World Smart Contract Lesson 28

I’m having trouble with lesson 28 in the solana curriculum of the hello world smart contract.

The task is to build the program using the command below:

cargo build-sbf --sbf-out-dir=../../dist/program

When I run the command in my terminal(im in this directroy btw - ~/solana-curriculum/learn-how-to-set-up-solana-by-building-a-hello-world-smart-contract/src/program-rust#) I get this error:
error: package constant_time_eq v0.3.0 cannot be built because it requires rustc 1.66.0 or newer, while the currently active rustc version is 1.62.0-dev

I ran rustc --version and the currect version is 1.72
I also updated rust using rustup update.

Thanks in advance :slight_smile:

I also noticed, that although I am in the correct directory:

I cant pass any of the tests.

Every test sees my output as /r and I write the exact command mentioned in the lesson.

It’s interesting because when I’m doing the lessons in the file I pass the tests.

Not sure if this is an issue on my end or with how freecodecamp is evaluating my commands/ running tests.

Welcome there,

What version of solana do you have?

hey @Sky020

My dev container is running Solana 1.14.7 the same one lesson 2 says to download, here’s the cli command:

sh -c "$(curl -sSfL"

Try updating it to the latest version:

sh -c "$(curl -sSfL"

1 Like

Thanks @Sky020 that solved the issue and I can compile the program now :raised_hands:

Do you know why I’m failing all the command line tests even though I’m putting in all the right commands?

If you have unexpected Git changes, they can fail. See:

Hope this helps

1 Like

Thanks for your help @Sky020

A post was split to a new topic: Solana Curriculum - Project 1 Lesson 28

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.