3

First, I tried with deploying on localhost with anchor deploy it works fine. But then I changed the cluster to devnet, changed Anchor.toml and lib.rs file with the address I got after anchor build. Then tried with anchor deploy --provider.cluster devnet

Changed the solana cluster also solana config set --url https://api.devnet.solana.com, then solana program deploy /target/deploy/voter.so. Still getting the error for both of the methods.

Deploying workspace: https://api.devnet.solana.com
Upgrade authority: /home/XXXXXX/.config/solana/id.json
Deploying program "voter"...
Program path: /home/<user>/workspace/voter/target/deploy/voter.so...
Error: Account xxxx is not an upgradeable program or already in use
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.

2 Answers2

0

First check if devnet is up and running with: https://status.solana.com

Then check if you have SOL: solana balance

^Usually it's one of those two!

I hope this helps!

0

The error gives the info: Error: Account xxxx is not an upgradeable program or already in use

Check the address you're trying to deploy to. You may need to change the program address to a new one if it's already being used by another program or user.

Jon C
  • 7,019
  • 10
  • 17
  • tried checking `target/deploy/voter-keypair.json` for address. Changed both Anchor.toml and lib.rs but still not able to get it – Satyaban Sahoo Jul 02 '22 at 06:19