Skip to content

Fix avm install for legacy versions#4248

Open
Ansh-699 wants to merge 2 commits intosolana-foundation:masterfrom
Ansh-699:fix-avm-4159
Open

Fix avm install for legacy versions#4248
Ansh-699 wants to merge 2 commits intosolana-foundation:masterfrom
Ansh-699:fix-avm-4159

Conversation

@Ansh-699
Copy link

@Ansh-699 Ansh-699 commented Feb 16, 2026

Fix avm install for <=0.30 by avoiding symlink collisions during source install and improving 404 messaging for missing binaries. Closes #4159.

fixed avm installs for older Anchor versions by installing from source into a temporary root and then moving the built binary into the versioned path, which avoids collisions with the anchor symlink, also improved error handling so missing prebuilt binaries return a clear 404 message and suggest --from-source, instead of a misleading “binary exists” failure.

@vercel
Copy link

vercel bot commented Feb 16, 2026

@Ansh-699 is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

avm/src/lib.rs Outdated
Comment on lines 458 to 469
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
match res.status() {
StatusCode::NOT_FOUND => bail!(
"No prebuilt binary found for version `{version}` (HTTP 404). \
Try `avm install {version} --from-source`."
),
status if !status.is_success() => bail!(
"Failed to download the binary for version `{version}` (status code: {})",
res.status()
),
_ => (),
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

avm install fails for versions ≤ 0.30.0 with misleading "binary exists" error & 404 missing assets

2 participants