Reputation: 747
New to using Anchor for Solana. I just installed Anchor along with Solana and Rust, Solana and Rust were successfully installed, but I have been having issues with Anchor.
Whenever I check the Anchor version or do anything like Anchor init, I get an error stating that the Anchor version installed is incorrect.
mabeloza@Mabels-MacBook-Pro ~ % anchor --version
Only x86_64 / Linux distributed in NPM package right now.
Trying globally installed Anchor.
Globally installed anchor version is not correct. Expected "anchor-cli 0.18.2", found "anchor-cli 0.18.0".
The error is self-explanatory, I need the Anchor version 0.18.2. The problem is that this version of Anchor doesn't exist, if you look at the github page the latest version is 0.18.0.
https://github.com/project-serum/anchor/releases/tag/v0.18.0
I am following the instructions found on the Anchor page (https://project-serum.github.io/anchor/getting-started/installation.html), is there a different fork/version of the Anchor project I should be using?
Thank you all for your contribution!
Upvotes: 7
Views: 5290
Reputation: 3535
If you are using MacOS to install Anchor
sh -c "$(curl -sSfL https://release.solana.com/v1.8.0/install)"
npm install -g yarn
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install --git https://github.com/project-serum/anchor --tag v0.18.0 anchor-cli --locked
npm install -g @project-serum/anchor
Note: Make sure the versions are the latest
Upvotes: 5