Skip to main content

Installation Methods

There are multiple ways to install the Solana CLI tools depending on your platform and preferred workflow:

Use the Solana Install Tool

The Agave installer is the simplest method to install and maintain the Solana CLI tools.

MacOS & Linux

1

Open Terminal

Open your favorite terminal application.
2

Run the installer

Install the latest Agave release:
sh -c "$(curl -sSfL https://release.anza.xyz/LATEST_AGAVE_RELEASE_VERSION/install)"
Replace LATEST_AGAVE_RELEASE_VERSION with a specific release tag, or use one of the symbolic channel names:
  • stable - Latest stable release
  • beta - Beta release channel
  • edge - Edge/development releases
Example:
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
3

Verify installation

A successful installation displays:
downloading LATEST_AGAVE_RELEASE_VERSION installer
Configuration: /home/solana/.config/solana/install/config.yml
Active release directory: /home/solana/.local/share/solana/install/active_release
* Release version: LATEST_AGAVE_RELEASE_VERSION
* Release URL: https://github.com/anza-xyz/agave/releases/download/LATEST_AGAVE_RELEASE_VERSION/solana-release-x86_64-unknown-linux-gnu.tar.bz2
Update successful
4

Update PATH (if needed)

If prompted to update your PATH environment variable:
Please update your PATH environment variable to include the solana programs:
Copy and paste the recommended command shown by the installer.
5

Confirm version

Verify the installation:
solana --version
Expected output:
solana-cli 2.0.0 (src:00000000; feat:123456789, client:Agave)

Windows

1

Open Command Prompt as Administrator

  • Search for “Command Prompt” in the Windows search bar
  • Right-click and select “Open as Administrator”
  • Click “Yes” if prompted by User Account Control
2

Download the installer

Run this command to download the Agave installer:
cmd /c "curl https://release.anza.xyz/LATEST_AGAVE_RELEASE_VERSION/agave-install-init-x86_64-pc-windows-msvc.exe --output C:\agave-install-tmp\agave-install-init.exe --create-dirs"
3

Run the installer

Execute the installer:
C:\agave-install-tmp\agave-install-init.exe LATEST_AGAVE_RELEASE_VERSION
Allow the program to run if prompted by security popups.
4

Close and reopen Command Prompt

  • Press Enter when the installer finishes
  • Close the Administrator Command Prompt
  • Open a new Command Prompt as a normal user
5

Verify installation

Check the installed version:
solana --version

Download Prebuilt Binaries

If you prefer not to use agave-install, manually download and install the binaries.

Linux

1

Download the release

Navigate to Agave Releases and download:
solana-release-x86_64-unknown-linux-gnu.tar.bz2
2

Extract and configure

Extract the archive and add to PATH:
tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2
cd solana-release/
export PATH=$PWD/bin:$PATH
3

Verify installation

solana --version

MacOS

1

Download the release

Navigate to Agave Releases and download:
solana-release-x86_64-apple-darwin.tar.bz2
2

Extract and configure

Extract the archive and add to PATH:
tar jxf solana-release-x86_64-apple-darwin.tar.bz2
cd solana-release/
export PATH=$PWD/bin:$PATH
3

Verify installation

solana --version

Windows

1

Download the release

Navigate to Agave Releases and download:
solana-release-x86_64-pc-windows-msvc.tar.bz2
2

Extract the archive

Use WinZip or a similar tool to extract the archive.
3

Set PATH

Open Command Prompt, navigate to the extracted directory, and run:
cd solana-release/
set PATH=%cd%/bin;%PATH%
4

Verify installation

solana --version

Build from Source

For advanced users who prefer to build from source or need custom configurations.

Prerequisites

Rust

Install Rust from rust-lang.org:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Linux (Debian/Ubuntu)

Install build dependencies:
apt-get install \
    build-essential \
    pkg-config \
    libudev-dev llvm libclang-dev \
    protobuf-compiler

Linux (Other Distributions)

Use your distribution’s package manager:
sudo dnf install gcc pkg-config libudev-devel llvm clang protobuf-compiler

MacOS

Install Homebrew from brew.sh, then:
brew install pkg-config libudev protobuf llvm coreutils
Follow any PATH configuration instructions shown after installation.

Windows

Windows users may need to install Windows Subsystem for Linux (WSL) to build from source. WSL provides a Linux environment within Windows.After installing WSL, run wsl from your Windows terminal and follow the Linux instructions above.
For native Windows builds:
  1. Install Build Tools for Visual Studio (2019 or later)
    • Include C++ build tools in the installation
  2. Install LLVM
  3. Install Protocol Buffers and add to PATH

Build and Install

1

Download source code

Navigate to Agave Releases and download the Source Code archive.
2

Extract and build

Extract the code and build:
tar -xzf agave-*.tar.gz
cd agave-*/
./scripts/cargo-install-all.sh .
export PATH=$PWD/bin:$PATH
The build process may take several minutes depending on your system.
3

Verify installation

solana --version

Use Homebrew

For MacOS and Linux users who prefer Homebrew package management.
Homebrew formulae are updated after each Solana release but may be outdated compared to the latest version.
1

Install via Homebrew

brew install solana
See the Homebrew formula for details.
2

Verify installation

solana --version

Updating the CLI

If you installed using agave-install, update to the latest version:
agave-install update
Update to a specific version:
agave-install update v2.0.0
Update to a specific channel:
agave-install update stable

Post-Installation

After installation, set up your CLI configuration:
# Set cluster endpoint
solana config set --url https://api.devnet.solana.com

# Verify configuration
solana config get
Output:
Config File: /home/solana/.config/solana/cli/config.yml
RPC URL: https://api.devnet.solana.com
WebSocket URL: wss://api.devnet.solana.com/ (computed)
Keypair Path: /home/solana/.config/solana/id.json
Commitment: confirmed

Troubleshooting

Command not found

If solana command is not found after installation, ensure the PATH is correctly set:
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
Add this line to your shell profile (~/.bashrc, ~/.zshrc, etc.) to make it permanent.

Version mismatch

Ensure your CLI version is compatible with the cluster you’re connecting to:
solana --version
solana cluster-version
The local CLI version should be greater than or equal to the cluster version.

Next Steps