solana-developers / program-examples

A repository of Solana program examples
779 stars 292 forks source link

basic/counter run anchor build && anchor deploy doesn't work #130

Open shippomx opened 1 month ago

shippomx commented 1 month ago
$ anchor build
    Finished release [optimized] target(s) in 0.09s
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.08s
     Running unittests src/lib.rs (/root/.cargo/target/debug/deps/counter_anchor-5510bc148d8d6b91)

$ anchor deploy
Deploying cluster: http://127.0.0.1:8899
Upgrade authority: /root/.config/solana/id.json
Deploying program "counter_anchor"...
Program path: /root/program-examples/basics/counter/anchor/target/deploy/counter_anchor.so...
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: "" }.

$ stat /root/program-examples/basics/counter/anchor/target/deploy/counter_anchor.so   
stat: cannot statx '/root/program-examples/basics/counter/anchor/target/deploy/counter_anchor.so': No such file or directory

it seems like, when i run anchor build, /root/program-examples/basics/counter/anchor/target/deploy/counter_anchor.so was not generated.

program-example commi: 401366c31096f54cf2e4e5ccad9fb55bd36053dd anchor: 0.30.1 solana-cli 1.18.25 (src:92ddaa20; feat:3241752014, client:Agave)

pmprete commented 1 week ago

Same happens to me for project created with "anchor init counterapp" using a Mac M1