1

By Deploying Anchor with command: anchor deploy I get this error:

Error: Unable to open program file: No such file or directory (os error 2)
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }

I tried a lot, but still can fix it - someone an idea?

2
  • I get this Error by the command solana validator: root@LAPTOP-91130O65:~/solana/poi# solana-test-validator Error: Unable to lock test-ledger directory. Check if another validator is running I got a tap open since 3 hours with this command: WebSocket PubSub URL: ws://127.0.0.1:8900 ⠒ 00:02:46 | Processed Slot: 238 | Confirmed Slot: 238 | Finalized Slot: 206 | Full Snapshot Slot: 200 | Incremental Snapshot Slot: - | Transactions ⠒ 00:02:46 | Processed Slot: 238 | Confirmed Slot: 238 | Finalized Slot: 206 | Full Snapshot Slot: 200 | Incremental Snapshot Slot: - | Transactions ⠲ 00:02:46 | Process Commented Jan 4 at 1:01
  • Please create a new question for the new comment
    – Jacob Creech
    Commented Jan 4 at 5:00

2 Answers 2

1

maybe you are trying to deploy to local cluster but your local validator is not running?

You can start it with

solana-test-validator

in the terminal.

Check your anchor.toml file you can also change the target to devnet there.

0

"I get this Error by the command solana validator:

root@LAPTOP-91130O65:~/solana/poi# solana-test-validator Error: Unable to lock test-ledger directory. Check if another validator is running"

You are getting this error because you already have the test-ledger folder with the previous validator files, in order to run a new one and fix that error, you need to delete the files and write solana-test-validator again.

Regarding your second question it will not finish, because basically you are running your own validator locally.

When testing you can use the Anchor test --skip-local-validator to test your program.

3
  • Let's add this answer when the original poster makes an additional question
    – Jacob Creech
    Commented Jan 4 at 5:00
  • How can I delete the files and write it again? I tried by "kill" the terminal and start it new with solana-test-validator, but it still going on to load some files since yesterday: ⠐ 00:01:50 | Processed Slot: 10524 | Confirmed Slot: 10524 | Finalized Slot: 10492 | Full Snapshot Slot: 10400 | Incremental Snapshot Slot: - | Transa Commented Jan 4 at 12:10
  • @LastUnicorn You can delete the test-folder manually . Commented Jan 5 at 0:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.