update installation page - new version number and recommended installation method

This commit is contained in:
Paul 2022-02-25 17:33:22 +01:00 committed by GitHub
parent aa6b26bc1e
commit c040e1b0a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 25 deletions

View File

@ -14,31 +14,7 @@ Go [here](https://yarnpkg.com/getting-started/install) to install Yarn.
## Anchor ## Anchor
### Install using pre-build binary on x86_64 Linux ### Installing using Anchor version manager (avm) (recommended)
Anchor binaries are available via an NPM package [`@project-serum/anchor-cli`](https://www.npmjs.com/package/@project-serum/anchor-cli). Only `x86_64` Linux is supported currently, you must build from source for other OS'.
### Build from source for other operating systems
For now, we can use Cargo to install the CLI.
```
cargo install --git https://github.com/project-serum/anchor --tag v0.20.1 anchor-cli --locked
```
On Linux systems you may need to install additional dependencies if cargo install fails. On Ubuntu,
```
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y pkg-config build-essential libudev-dev
```
Now verify the CLI is installed properly.
```
anchor --version
```
### Installing using Anchor version manager (avm)
Anchor version manager is a tool for using multiple versions of the anchor-cli. It will require the same dependencies as building from source. It is recommended you uninstall the NPM package if you have it installed. Anchor version manager is a tool for using multiple versions of the anchor-cli. It will require the same dependencies as building from source. It is recommended you uninstall the NPM package if you have it installed.
@ -59,3 +35,27 @@ Verify the installation.
``` ```
anchor --version anchor --version
``` ```
### Install using pre-build binary on x86_64 Linux
Anchor binaries are available via an NPM package [`@project-serum/anchor-cli`](https://www.npmjs.com/package/@project-serum/anchor-cli). Only `x86_64` Linux is supported currently, you must build from source for other OS'.
### Build from source for other operating systems without avm
We can also use Cargo to install the CLI directly. Make sure that the `--tag` argument uses the version you want (the version here is just an example).
```
cargo install --git https://github.com/project-serum/anchor --tag v0.22.0 anchor-cli --locked
```
On Linux systems you may need to install additional dependencies if cargo install fails. On Ubuntu,
```
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y pkg-config build-essential libudev-dev
```
Now verify the CLI is installed properly.
```
anchor --version
```