Currently viewing the AI version
Switch to human version

AVM (Anchor Version Manager) - Technical Reference

Core Problem

Anchor version conflicts cause "works on my machine" build failures. Teams waste entire afternoons debugging version mismatches between Anchor CLI versions (0.29 vs 0.30+), with breaking changes destroying builds.

Solution Overview

AVM manages multiple Anchor CLI versions per project, similar to nvm for Node.js. Enables version isolation, verifiable builds, and team coordination.

Configuration

Installation Requirements

  • Rust via rustup (mandatory - package managers break AVM compilation)
  • Git (AVM pulls from GitHub)
  • Solana CLI (install before AVM to avoid confusing error messages)
  • Platform: Use WSL on Windows (native Windows support broken)

Installation Command

cargo install --git https://github.com/coral-xyz/anchor avm --force
  • --force flag required for reinstalls after failures
  • Compilation time: 5-25 minutes depending on dependency rebuilds
  • Binary installed to ~/.cargo/bin/avm

Version Management Commands

avm install 0.30.1    # Install specific version
avm use 0.30.1        # Switch to version (per terminal session)
avm list              # Show installed versions
avm install latest    # Install bleeding edge (often broken)

Critical Warnings

Installation Failure Modes

  1. "No such file or directory" - Git missing or PATH corrupted
  2. Compilation errors - Old Rust version (run rustup update)
  3. 15+ minute timeouts - Network issues during source compilation
  4. Version conflicts - Multiple Anchor installs fighting for control

PATH Management Issues

  • AVM only affects current terminal session
  • Must run avm use X.X.X in every new terminal
  • Common PATH conflicts with npm installs and cargo direct installs

Production Critical Issues

  • Version X.X.X not installed after successful install - AVM state corruption
  • Wrong version after avm use - Multiple installation sources conflict
  • Windows PATH handling broken - Use WSL instead

Resource Requirements

Time Investment

  • Initial setup: 2-30 minutes (depending on compilation issues)
  • Per-project setup: 2 minutes (avm install X.X.X && avm use X.X.X)
  • Debugging broken installs: 2+ hours (nuclear option: delete ~/.avm and reinstall)

Disk Space

  • Wasteful: Each version ~100MB+ in ~/.avm/versions/
  • Storage locations: ~/.avm/bin/ (binaries), ~/.avm/versions/ (tracking)

Expertise Requirements

  • Basic Rust toolchain knowledge
  • Understanding of PATH manipulation
  • Debugging shell environment issues

Troubleshooting Decision Tree

When avm install latest Fails

  1. Check which git - install git if missing
  2. Verify ~/.cargo/bin in PATH
  3. Restart terminal (PATH changes need pickup)
  4. Try specific version instead of latest

When anchor --version Shows Wrong Version

  1. Remove npm installations:
    npm uninstall -g @project-serum/anchor-cli
    npm uninstall -g @coral-xyz/anchor-cli
    
  2. Verify which anchor points to ~/.avm/bin/anchor
  3. Nuclear option: rm -rf ~/.avm and reinstall

When Installation Takes Forever

  • AVM compiles from source by default (15+ minutes)
  • Pre-built binaries available since v0.31.0 for:
    • aarch64-apple-darwin (M1/M2 Mac)
    • x86_64-unknown-linux-gnu (Intel Linux)
    • x86_64-apple-darwin (Intel Mac)
    • x86_64-pc-windows-msvc (Windows)
  • Unsupported platforms require --from-source flag

Breaking Points and Failure Scenarios

AVM Self-Destruction Triggers

  • Mixing cargo install with AVM installs
  • Rust toolchain updates (breaks compiled binaries)
  • Intel/ARM Mac switches with different compiled binaries
  • Node 18.2.0 specific PATH conflicts

Team Coordination Failures

  • Different team members on different Anchor versions hit different bugs
  • No version documentation leads to onboarding nightmares
  • Version leakage between projects causes random build failures

Alternative Approaches Comparison

Approach Installation Pain Version Management Team Coordination Reliability
AVM High (compile hell) Excellent Easy (avm use X.X.X) Usually fixable
Cargo Direct Medium (one compile) None (single version) Manual nightmare Requires reinstall when broken
NPM Low (when works) None (single version) Worse nightmare Unreliable

Production Deployment Considerations

Verifiable Builds

  • Install from specific commit hashes for exact reproducibility
  • Required when deploying contracts with real money at stake
  • Command: avm install <commit-hash>

Version Pinning Strategy

  • Document exact Anchor version in README
  • Pin team to same version or accept build chaos
  • Most projects use 0.30.1 (stable, upgrade risk too high)

Common Misconceptions

  1. "AVM is just like nvm" - Similarity ends at concept; AVM has unique failure modes
  2. "Latest version is best" - Latest often broken, use stable versions
  3. "One installation works everywhere" - Per-terminal session scope causes confusion
  4. "Windows support works" - Native Windows support fundamentally broken

Success Criteria

  • anchor --version shows expected version after avm use
  • Team members can reproduce builds with same version
  • Projects can upgrade/downgrade Anchor versions without conflicts
  • New developers can onboard without environment debugging

Nuclear Options (When All Else Fails)

  1. Delete ~/.avm entirely and reinstall (5 minutes vs 2+ hours debugging)
  2. Direct cargo install for single-version setups
  3. Docker containers with known-working versions
  4. Switch to different platform (WSL, Linux VM)

Time limit: Don't spend more than 2 hours debugging AVM installation - it's meant to save time, not waste it.

Useful Links for Further Investigation

Actually Helpful Resources (No Bullshit)

LinkDescription
Stack Exchange: Getting rid of old anchor-cli versionsThis Stack Overflow answer saved my life when I had 3 different Anchor installs fighting for control.
GitHub Issues: AVM install failuresReal problems from actual users are documented here, with solutions that work maybe 60% of the time.
Anchor Discord #help-anchorThis Discord channel offers hit or miss support for Anchor issues, but sometimes you get lucky with a helpful solution.
AVM ReferenceThis reference provides actual command documentation for AVM, focusing on technical details rather than marketing copy.
Anchor Installation GuideA step-by-step guide for setting up Anchor, though it tends to gloss over some common installation problems users might encounter.
Anchor ChangelogThis changelog details what actually changed between different Anchor versions, which is important information for effective debugging and understanding updates.
Rust via rustupIt is crucial to use rustup for installing Rust; avoid package managers, or AVM will not compile correctly.
Solana CLIYou will inevitably need the Solana CLI within 5 minutes after successfully installing Anchor anyway.
WSL for WindowsWindows Subsystem for Linux (WSL) is recommended for Windows users because native Windows support for Anchor is currently broken.
Anchor RepositoryWhen error messages don't make sense during development, reading the Anchor source code can provide crucial insights.
AVM Source CodeReview the AVM source code directly to gain a deeper understanding of why your installation might have failed.
Direct Cargo Install GuideThis guide explains how to simply `cargo install anchor-cli` and manage with single versions when AVM is problematic.
Docker Anchor ImagesThese Docker images are a lifesaver for when your local development environment is completely broken and unusable.
Solana PlaygroundA web-based Integrated Development Environment (IDE) for Solana, offering a solution to avoid local installation pain and setup complexities.
Solana Stack ExchangeA community-driven question and answer site where real developers discuss and solve problems related to Solana and Anchor.
Anchor Tutorials That WorkThe official quickstart guide for Anchor, providing tutorials that are generally reliable and work correctly most of the time.
Solana CookbookA comprehensive collection of practical examples and recipes for Solana development, going beyond basic 'hello world' tutorials.

Related Tools & Recommendations

tool
Popular choice

jQuery - The Library That Won't Die

Explore jQuery's enduring legacy, its impact on web development, and the key changes in jQuery 4.0. Understand its relevance for new projects in 2025.

jQuery
/tool/jquery/overview
60%
tool
Popular choice

Hoppscotch - Open Source API Development Ecosystem

Fast API testing that won't crash every 20 minutes or eat half your RAM sending a GET request.

Hoppscotch
/tool/hoppscotch/overview
57%
tool
Popular choice

Stop Jira from Sucking: Performance Troubleshooting That Works

Frustrated with slow Jira Software? Learn step-by-step performance troubleshooting techniques to identify and fix common issues, optimize your instance, and boo

Jira Software
/tool/jira-software/performance-troubleshooting
55%
tool
Popular choice

Northflank - Deploy Stuff Without Kubernetes Nightmares

Discover Northflank, the deployment platform designed to simplify app hosting and development. Learn how it streamlines deployments, avoids Kubernetes complexit

Northflank
/tool/northflank/overview
52%
tool
Similar content

Anchor Framework Production Deployment - The Reality Nobody Talks About

The failures, the costs, and the late-night debugging sessions nobody talks about in the tutorials

Anchor Framework
/tool/anchor/production-deployment
52%
tool
Similar content

Anchor Version Manager (AVM) - Stop Fighting With Anchor Installs

Manage multiple Anchor CLI versions without the dependency hell that makes you want to switch to Ethereum development

Anchor Version Manager
/tool/anchor-version-manager/overview
52%
tool
Popular choice

LM Studio MCP Integration - Connect Your Local AI to Real Tools

Turn your offline model into an actual assistant that can do shit

LM Studio
/tool/lm-studio/mcp-integration
50%
tool
Popular choice

CUDA Development Toolkit 13.0 - Still Breaking Builds Since 2007

NVIDIA's parallel programming platform that makes GPU computing possible but not painless

CUDA Development Toolkit
/tool/cuda/overview
47%
tool
Similar content

Anchor Framework - Solana Development Framework for Smart Contracts

Simplify Solana Program Development with Rust-based Tools and Enhanced Security Features

Anchor Framework
/tool/anchor/overview
45%
news
Popular choice

Taco Bell's AI Drive-Through Crashes on Day One

CTO: "AI Cannot Work Everywhere" (No Shit, Sherlock)

Samsung Galaxy Devices
/news/2025-08-31/taco-bell-ai-failures
45%
tool
Similar content

Development Containers - Your Dev Environment in a Box

Ever spent your first day on a new project just trying to get fucking Node to work?

Development Containers
/tool/development-containers/overview
44%
news
Popular choice

AI Agent Market Projected to Reach $42.7 Billion by 2030

North America leads explosive growth with 41.5% CAGR as enterprises embrace autonomous digital workers

OpenAI/ChatGPT
/news/2025-09-05/ai-agent-market-forecast
42%
news
Popular choice

Builder.ai's $1.5B AI Fraud Exposed: "AI" Was 700 Human Engineers

Microsoft-backed startup collapses after investigators discover the "revolutionary AI" was just outsourced developers in India

OpenAI ChatGPT/GPT Models
/news/2025-09-01/builder-ai-collapse
40%
news
Popular choice

Docker Compose 2.39.2 and Buildx 0.27.0 Released with Major Updates

Latest versions bring improved multi-platform builds and security fixes for containerized applications

Docker
/news/2025-09-05/docker-compose-buildx-updates
40%
news
Popular choice

Anthropic Catches Hackers Using Claude for Cybercrime - August 31, 2025

"Vibe Hacking" and AI-Generated Ransomware Are Actually Happening Now

Samsung Galaxy Devices
/news/2025-08-31/ai-weaponization-security-alert
40%
news
Popular choice

China Promises BCI Breakthroughs by 2027 - Good Luck With That

Seven government departments coordinate to achieve brain-computer interface leadership by the same deadline they missed for semiconductors

OpenAI ChatGPT/GPT Models
/news/2025-09-01/china-bci-competition
40%
news
Popular choice

Tech Layoffs: 22,000+ Jobs Gone in 2025

Oracle, Intel, Microsoft Keep Cutting

Samsung Galaxy Devices
/news/2025-08-31/tech-layoffs-analysis
40%
news
Popular choice

Builder.ai Goes From Unicorn to Zero in Record Time

Builder.ai's trajectory from $1.5B valuation to bankruptcy in months perfectly illustrates the AI startup bubble - all hype, no substance, and investors who for

Samsung Galaxy Devices
/news/2025-08-31/builder-ai-collapse
40%
news
Popular choice

Zscaler Gets Owned Through Their Salesforce Instance - 2025-09-02

Security company that sells protection got breached through their fucking CRM

/news/2025-09-02/zscaler-data-breach-salesforce
40%
news
Popular choice

AMD Finally Decides to Fight NVIDIA Again (Maybe)

UDNA Architecture Promises High-End GPUs by 2027 - If They Don't Chicken Out Again

OpenAI ChatGPT/GPT Models
/news/2025-09-01/amd-udna-flagship-gpu
40%

Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization