Installation Methods
There are multiple ways to install the Solana CLI tools depending on your platform and preferred workflow:
The Agave installer is the simplest method to install and maintain the Solana CLI tools.
MacOS & Linux
Open Terminal
Open your favorite terminal application.
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)"
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
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. Confirm version
Verify the installation:Expected output:solana-cli 2.0.0 (src:00000000; feat:123456789, client:Agave)
Windows
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
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"
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. 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
Verify installation
Check the installed version:
Download Prebuilt Binaries
If you prefer not to use agave-install, manually download and install the binaries.
Linux
Download the release
Navigate to Agave Releases and download:solana-release-x86_64-unknown-linux-gnu.tar.bz2
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
MacOS
Download the release
Navigate to Agave Releases and download:solana-release-x86_64-apple-darwin.tar.bz2
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
Windows
Download the release
Navigate to Agave Releases and download:solana-release-x86_64-pc-windows-msvc.tar.bz2
Extract the archive
Use WinZip or a similar tool to extract the archive.
Set PATH
Open Command Prompt, navigate to the extracted directory, and run:cd solana-release/
set PATH=%cd%/bin;%PATH%
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:
- Install Build Tools for Visual Studio (2019 or later)
- Include C++ build tools in the installation
- Install LLVM
- Install Protocol Buffers and add to PATH
Build and Install
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.
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.
Updating the CLI
If you installed using agave-install, update to the latest version:
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