3

When running anchor test on a fresh project without any change, I got following error:

Unable to get recent blockhash. Test validator does not look started. Check {} for errors. Consider increasing [test.startup_wait] in Anchor.toml.

I first tried increasing startup_wait as suggested, but that didn't worked, then tried running solana-test-validator --log and saw error was:

Aborted (core dumped)

So I also tried building it from source as suggested in this answer, but got another error when running solana-test-validator --log again:

Illegal instruction (core dumped)

1 Answer 1

1

If you already tried all this and still getting Illegal instruction error, you probably need to change some compilation variables.

In my case, the problem was the old CPU (older than 2013) and fixed by setting:

export RUST_REED_SOLOMON_ERASURE_ARCH=native

and then compiling all:

./scripts/cargo-install-all.sh . 

as mentioned in this Issue's comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.