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

examples fail with error #113

Open
evanrolfe opened this issue May 10, 2023 · 2 comments
Open

examples fail with error #113

evanrolfe opened this issue May 10, 2023 · 2 comments

Comments

@evanrolfe
Copy link

I've tried both the xdp-hello and tc-egress examples, following the instructions on the readme and they both fail with the same error when I run: cargo xtask run:

thread 'main' panicked at 'failed to run the command: Os { code: 2, kind: NotFound, message: "No such file or directory" }', xtask/src/run.rs:65:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@riyaolin
Copy link

riyaolin commented Jan 2, 2024

By default, the runner will append the sudo -E to the run command (for instance, the xdp-hello: https://github.com/aya-rs/book/blob/main/examples/xdp-hello/xtask/src/run.rs#L17). So if you run it as root and sudo command does not exist, you will get that error.

One workaround is to specify the -r option with an empty string:
RUST_LOG=info cargo xtask run -r ""

@bboyleonp666
Copy link

Just to update the information. Recently, I was trying with xdp-hello example, and it turns out there's an option called --runner that specifies the prefix command for running the case. In my case, if the sudo command is not installed, you can either install it and rerun again or do RUST_LOG=info cargo xtask run --runner "". Hope this work for you!

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

No branches or pull requests

3 participants