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
6/2/2026
Claude CodeCursorWindsurf
#solana#dependency-resolution#compatibility#toolchain#anchor

Recommended for

Automated summary

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

How this analysis is made

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"

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/solana-dependency-compatibility-resolution-mmh8qr43/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/solana-dependency-compatibility-resolution-mmh8qr43' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/solana-dependency-compatibility-resolution-mmh8qr43/download' --output '.skill-downloads/solana-dependency-compatibility-resolution-mmh8qr43/SKILL.md.part' && mv '.skill-downloads/solana-dependency-compatibility-resolution-mmh8qr43/SKILL.md.part' '.skill-downloads/solana-dependency-compatibility-resolution-mmh8qr43/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/solana-dependency-compatibility-resolution-mmh8qr43/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills