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

anchor build and anchor deploy Fail Despite Successful Installation of Anchor via Cargo #3164

Closed
SandeepMahto17 opened this issue Aug 11, 2024 · 2 comments

Comments

@SandeepMahto17
Copy link

Description:
I encountered issues when running anchor build and anchor deploy commands even after
successfully installing Anchor using Cargo with the following command:
cargo install --git https://github.com/coral-xyz/anchor --tag v0.30.1 anchor-cli --force
I also tried to install Anchor using avm install latest, which failed with an error related to the
Box<> type from the times package.
A few months ago, I successfully installed Anchor using avm install latest on another laptop,
and everything worked properly without any issues.
Steps to Reproduce:

  1. Install Anchor using Cargo:
    cargo install --git https://github.com/coral-xyz/anchor --tag v0.30.1 anchor-cli --force
  2. Run anchor build and anchor deploy.
  3. Observe the errors.
    Expected Behavior:
    The anchor build and anchor deploy commands should execute successfully without any
    errors after a successful installation of Anchor.
    Environment:
    • Anchor Version: 0.30.1

• Installation Method: Cargo, GitHub (via cargo install --git https://github.com/coral-xyz/anchor --tag v0.30.1 anchor-cli --force)

• Operating System: WSL Ubuntu 22.04.4

Screenshot 2024-08-11 002243

Screenshot 2024-08-11 002303

@acheroncrypto
Copy link
Collaborator

anchor 0.28.0 is not installed with avm. Installing...

This means you have set toolchain.anchor_version to 0.28.0, which overrides your anchor deploy command to use that version, and the installation fails due to #3126. See "Note" section of #3143 for more info.

@SandeepMahto17
Copy link
Author

Thanks, it worked.

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

No branches or pull requests

2 participants