Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avm install latest error " Error: No such file or directory (os error 2))" #3501

Open
wbreeze opened this issue Jan 20, 2025 · 3 comments
Open
Labels

Comments

@wbreeze
Copy link

wbreeze commented Jan 20, 2025

Similar issue to #3482

Here is the transcript

$ anchor --version
Error: Anchor version not set. Please run `avm use latest`.
$ avm use latest
Version 0.30.1 is not installed. Would you like to install? [y/n]
y
Error: No such file or directory (os error 2)

I have done brew install rust before installing avm and anchor. Yet have this same message. It's opaque. Some script trying to find some directory; who knows what? which avm shows a binary. hard to figure-out where this is coming from.

@wbreeze
Copy link
Author

wbreeze commented Jan 20, 2025

The solution was to uninstall rust with brew and reinstall it with rustup.

$ brew uninstall rust
$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Still. It looks to me like an issue.

@acheroncrypto
Copy link
Collaborator

This is not specific to avm e.g. you could get it even if you just install Solana tools and run carego build-sbf (#2831 (comment)). To improve the situation, we can look to see if you installed Rust properly (using the official installer) and provide a better error message if the Rust binaries are not found.

@asafsensi
Copy link

I have the same issue
latest rust, solana, and anchor installed:

(base) shadowbeast@Asafs-MacBook-Pro test % anchor init anchor_test
Error: No such file or directory (os error 2)
(base) shadowbeast@Asafs-MacBook-Pro test % rustc --version
rustc 1.84.0 (9fc6b4312 2025-01-07)
(base) shadowbeast@Asafs-MacBook-Pro test % solana --version
solana-cli 2.0.24 (src:4c817c28; feat:607245837, client:Agave)
(base) shadowbeast@Asafs-MacBook-Pro test % anchor --version
anchor-cli 0.30.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants