Prerequisites
Pick your operating system. The steps after this section are the same on every system.Rust needs a C compiler and linker. On macOS they come with Apple’s
command-line developer tools. If you don’t have them yet, install them in
Terminal:Then continue with Install Rust.
Terminal
1
Install Rust
Developers build Solana programs using the Rust
programming language.After a successful installation you will see the following message:
The command prints the installed Rust version, for example:
- Install Rust using rustup by entering the following command in your terminal:
Terminal
Successful Rust Install Message
Successful Rust Install Message
- Reload your PATH environment variable to include Cargo’s bin directory:
Terminal
- Verify that the installation was successful.
Terminal
2
Install Solana CLI
The Solana CLI provides all the tools required to build and deploy Solana
programs.If The command prints the installed Solana CLI version, for example:
- Install the Solana CLI tool suite by using the official install command:
Terminal
You can replace
stable with a specific Agave release tag or with the beta
or edge release channel.- Make the Solana CLI available in your current terminal.
Terminal
solana is still unavailable, restart your terminal. To confirm which shell
configuration file the installer updated, check your current shell:Terminal
- If the output contains
/bash, restart the terminal or runsource ~/.bashrc. - If the output contains
/zsh, restart the terminal or runsource ~/.zshrc.
- Verify that the installation succeeded:
Terminal
You can view all available versions on the
Agave GitHub repository. Agave is
the validator client from Anza, formerly known as
Solana Labs validator client.
- To update the Solana CLI later, run:
Terminal
3
Install Anchor CLI
Anchor is a framework for developing Solana
programs. The Anchor framework uses Rust macros to simplify the process of
writing Solana programs.
The command prints the installed Node.js version, for example:
Prerequisites
Node.js and npm, which ships with Node.js, are required only when you select a TypeScript test template such as Mocha or Jest. Anchor uses pnpm or Yarn instead when either is installed. The default LiteSVM test template runs in Rust and does not require Node.js tooling.Node Installation
Node Installation
- Install Node using Node Version Manager (nvm) by running the following command:
Terminal
- Restart your terminal and confirm that the
nvmcommand runs successfully:
Terminal
- Use
nvmto install Node:
Terminal
- Verify that the installation succeeded, by checking the Node version:
Terminal
Installation
You can install the Anchor CLI and tooling in two ways:- Anchor Version Manager (AVM) — Recommended installation method
- Without AVM — Install directly from GitHub
The Anchor Version Manager (AVM) allows you to install and manage different
Anchor versions on your system and easily update Anchor versions in the future.
To install Anchor using AVM, follow the steps below:To install the latest version instead:When you run The command prints the active Anchor CLI version, for example:
- Install AVM with the following command:
Terminal
- Confirm that AVM installed successfully:
Terminal
- Install Anchor CLI using AVM. These docs and the Quickstart installer use Anchor CLI 1.1.2:
Terminal
Terminal
anchor, AVM also installs and activates the Solana CLI release
that matches the active Anchor version (Solana CLI 3.1.10 for Anchor 1.1.2),
and prints 3.1.10 initialized when it switches.When installing the Anchor CLI on Linux or WSL, you may encounter this error:If you see this error message, follow these steps:
- Install the dependencies listed in the Linux tab at the top of this page.
- Retry installing the Anchor CLI.
- Verify that the installation succeeded, by checking the Anchor CLI version:
Terminal
Run
avm use to select the Anchor CLI version for your system.- If you installed the latest version, run
avm use latest. - If you installed version
1.1.2, runavm use 1.1.2.
Error: canonicalizing AVM executable? If anchor fails with this error,
AVM’s nightly channel is on. Anchor’s avm/install shell script installs the
nightly AVM and turns the channel on. Turn it off, then select your version
again:Terminal
4
Install Surfpool CLI
Surfpool is a tool for local development and an improved
replacement for The command prints the installed Surfpool CLI version, for example:
solana-test-validator.- Install Surfpool with the following command:
Terminal
- Verify that the installation was successful by checking the Surfpool CLI version:
Terminal






