Solana DocumentationLocal development

Install Dependencies

Install each dependency separately when you need a specific version or when the quick installation does not complete successfully. Follow the sections in order for a new environment, or go directly to the tool you need to install or troubleshoot.

Prerequisites

Install Rust

Developers build Solana programs using the Rust programming language.

  1. Install Rust using rustup by entering the following command in your terminal:
Terminal
$
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

After a successful installation you will see the following message:

  1. Reload your PATH environment variable to include Cargo's bin directory:
Terminal
$
. "$HOME/.cargo/env"
  1. Verify that the installation was successful.
Terminal
$
rustc --version

The command prints the installed Rust version, for example:

rustc x.y.z (...)

Install Solana CLI

The Solana CLI provides all the tools required to build and deploy Solana programs.

  1. Install the Solana CLI tool suite by using the official install command:
Terminal
$
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"

You can replace stable with a specific Agave release tag or with the beta or edge release channel.

  1. Make the Solana CLI available in your current terminal.

The installer updates your shell configuration and prints the command required to update the current session. The command is typically:

Terminal
$
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"

If solana is still unavailable, restart your terminal. To confirm which shell configuration file the installer updated, check your current shell:

Terminal
$
echo $SHELL
  • If the output contains /bash, restart the terminal or run source ~/.bashrc.
  • If the output contains /zsh, restart the terminal or run source ~/.zshrc.
  1. Verify that the installation succeeded:
Terminal
$
solana --version

The command prints the installed Solana CLI version, for example:

solana-cli x.y.z (..., client:Agave)

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.

  1. To update the Solana CLI later, run:
Terminal
$
agave-install update

Install Anchor CLI

Anchor is a framework for developing Solana programs. The Anchor framework leverages Rust macros to simplify the process of writing Solana programs.

Prerequisites

Node.js and a JavaScript package manager are required only when you select a TypeScript test template such as Mocha or Jest. The default LiteSVM test template runs in Rust and does not require Node.js tooling.

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:

  1. Install AVM with the following command:
Terminal
$
curl -sSfL https://raw.githubusercontent.com/otter-sec/anchor/master/avm/install | sh
  1. Confirm that AVM installed successfully:
Terminal
$
avm --version
  1. Install Anchor CLI using AVM:

To install the latest version:

Terminal
$
avm install latest
$
avm use latest

To install a specific version, specify the version number:

Terminal
$
avm install 1.1.2
$
avm use 1.1.2

When installing the Anchor CLI on Linux or WSL, you may encounter this error:

error: could not exec the linker cc = note: Permission denied (os error 13)

If you see this error message, follow these steps:

  1. Install the dependencies listed in the Linux section at the top of this page.
  2. Retry installing the Anchor CLI.
  1. Verify that the installation succeeded, by checking the Anchor CLI version:
Terminal
$
anchor --version

The command prints the active Anchor CLI version, for example:

anchor-cli 1.1.2

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, run avm use 1.1.2.

Install Surfpool CLI

Surfpool is a tool for local development and an improved replacement for solana-test-validator.

  1. Install Surfpool with the following command:
Terminal
$
curl --proto '=https' --tlsv1.2 -sSfL https://run.surfpool.run/ | bash
  1. Verify that the installation was successful by checking the Surfpool CLI version:
Terminal
$
surfpool --version

The command prints the installed Surfpool CLI version, for example:

surfpool x.y.z

Is this page helpful?

Table of Contents

Edit Page
© 2026 Solana Foundation. All rights reserved.