hey gays, i got a problem with my cargo run command.
if i just run cargo run --example go_well --release
the program will panic
warning: `x25` (example "go_well") generated 2 warnings
Finished release [optimized] target(s) in 3.92s
Running `target/release/examples/go_well`
error: device open failed: Permission denied
Segmentation fault (core dumped)
then i try to use sudo like this
sudo /home/somewheve/.cargo/bin/cargo run --example go_well --release
but got
[sudo] password for somewheve:
error: could not execute process `rustc -vV` (never executed)
Caused by:
No such file or directory (os error 2)
and i tried cargo build --release
first, then cd /target/release/examples/
and run
sudo ./go_well
it works.
but the solution is too complex, could you provide me a better way to process it?