Solana Dependency & Compatibility Resolution

VerifiedSafe

Diagnoses and resolves Solana development environment dependency mismatches, including version conflicts between Anchor, Solana CLI, Rust, and platform tools. Ideal when encountering build errors (cargo build-sbf/bpf), GLIBC errors, or during version upgrades and environment setup.

Sby Skills Guide Bot
DevelopmentAdvanced
1206/2/2026
Claude CodeCursorWindsurf
#solana#dependency-resolution#compatibility#toolchain#anchor

Recommended for

Our review

Resolves Solana toolchain dependency conflicts including version mismatches between Anchor, Solana CLI, Rust, platform tools, and GLIBC.

Strengths

  • Covers the most common Solana development pain points
  • Provides a compatibility matrix for version combinations
  • Includes error-specific solutions and install guides
  • Supports migration between major Anchor versions

Limitations

  • Requires manual execution of diagnostic commands by the user
  • Compatibility matrix may need updates as new versions are released
  • Does not automatically fix environment issues—provides guidance only
When to use it

Use when setting up a new Solana environment, upgrading Anchor/Solana/Rust, or encountering build errors with version conflicts.

When not to use it

Avoid if the problem is unrelated to Solana toolchain versions, such as logic bugs or network issues.

Security analysis

Safe
Quality score90/100

This skill only provides informational guidance and diagnostic commands. It does not instruct destructive actions, exfiltration, or circumvention of security measures. All commands are safe version checks and environment queries, with no execution risk.

No concerns found

Examples

GLIBC error during anchor build
I'm getting a GLIBC error when running anchor build on my Ubuntu 22.04 machine. Can you help me fix it?
Set up a Solana dev environment with specific versions
I need to set up a Solana development environment with Anchor 0.31.1 and Solana CLI 2.1.x. What are the compatible Rust and platform tools versions?
Upgrade Anchor version
I'm migrating from Anchor 0.29 to 0.31. How do I resolve version conflicts with solana-program and cargo build-sbf?

Solana Dependency & Compatibility Resolution

Description

Resolves the notoriously painful Solana toolchain dependency issues — version mismatches between Anchor, Solana CLI, Rust, Platform Tools, GLIBC, and related crates. This is the #1 developer pain point in the Solana ecosystem.

When to Use

Activate this skill when you encounter ANY of these situations:

  • Setting up a new Solana development environment
  • Upgrading Anchor, Solana CLI, or Rust versions
  • Build errors mentioning cargo build-sbf, cargo build-bpf, platform-tools, or rustc versions
  • GLIBC errors (GLIBC_2.38 not found, GLIBC_2.39 not found)
  • solana-program crate version conflicts
  • Anchor IDL generation failures
  • "No space left on device" during Solana toolchain install
  • Any error during anchor build, anchor test, or program deployment
  • Migration between Anchor versions (0.29→0.30→0.31→0.32)
  • Migration from solana-program-test/bankrun to litesvm

Instructions

Step 1: Diagnose Current Environment

Ask the user to run these commands and share the output:

# Check all versions
rustc --version
solana --version
anchor --version
avm --version
cargo build-sbf --version 2>/dev/null || echo "cargo build-sbf not found"
node --version
yarn --version || npm --version

# Check OS/GLIBC
uname -a
ldd --version 2>&1 | head -1  # Linux only
cat /etc/os-release 2>/dev/null | head -5  # Linux only

# Check Anchor.toml toolchain settings
cat Anchor.toml 2>/dev/null | grep -A5 '\[toolchain\]'

Step 2: Consult the Compatibility Matrix

Refer to compatibility-matrix.md to find the correct version combination for the user's needs.

Step 3: Check Common Errors

If the user has a specific error, check common-errors.md for the exact error message and its fix.

Step 4: Guide Installation

If a fresh install or upgrade is needed, refer to install-guide.md for step-by-step instructions.

Reference Files

Common Patterns

Quick Version Check

rustc --version && solana --version && anchor --version

Safe Modern Stack (as of Jan 2026)

Anchor 0.31.1+ with Solana CLI 2.1.x, Rust 1.79-1.83, Platform Tools v1.47+
Requires: Ubuntu 24.04+ or macOS 14+ (for GLIBC 2.38+)

Legacy-Compatible Stack

Anchor 0.30.1 with Solana CLI 1.18.x, Rust 1.79.0, Platform Tools v1.43
Works on: Ubuntu 20.04+, macOS 12+

Override Rust for Anchor Build

When AVM installs Anchor < 0.31, it auto-uses rustc 1.79.0 to avoid the Rust 1.80 time crate issue (#3143).

Anchor.toml Toolchain Override

[toolchain]
anchor_version = "0.31.1"
solana_version = "2.1.7"
Related skills