'Anchor test without AVX2 CPU
After initialising a project with anchor init, when I run anchor-test, it gives me this message at the last.
Unable to get recent blockhash. Test validator does not look started. Check .anchor/test-ledger/test-ledger-log.txt for errors. Consider increasing [test.startup_wait] in Anchor.toml.
The expected output at last should be the transaction hash but I don't get it.
When I use solana-test-validator it returns Aborted(Core Dumped). It seems like my CPU is not AVX2 compatible for which I am not able to run solana-test-validator.
The project is instructing me to build from source.
What to do now?
Solution 1:[1]
Sounds like you'll need to build solana-test-validator from source! This isn't very hard to do thankfully, and the steps go:
- Install Rust:
$ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env
$ rustup component add rustfmt
- Install build dependencies, for Ubuntu:
$ sudo apt-get update
$ sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang make
- Download the source code:
$ git clone https://github.com/solana-labs/solana.git
$ cd solana
- Build the test validator:
$ cargo build --bin solana-test-validator --release
- Run it:
$ ./target/release/solana-test-validator
More information directly in the repo: https://github.com/solana-labs/solana#building
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jon C |
