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

sudo and libpcap error #8

Closed
ashwin opened this issue Apr 1, 2021 · 2 comments
Closed

sudo and libpcap error #8

ashwin opened this issue Apr 1, 2021 · 2 comments

Comments

@ashwin
Copy link

ashwin commented Apr 1, 2021

I tried to run this on WSL on an x86 machine and got this error:

$ sudo ./dnspeep
Error: Failed to start. You need to run this as root.

Caused by:
    libpcap error: socket: Address family not supported by protocol

Location:
    src/main.rs:91:10

I am not sure why it says You need to run this as root. when I am running it as sudo. And there is also the libpcap error, which I am hoping is because of the sudo error.

@jvns
Copy link
Owner

jvns commented Apr 1, 2021

This isn't because of sudo, that's a red herring -- I updated the error message to say "you might need to run as root" instead of "you need to run as root". I think this might be a WSL issue.

Are you using WSL1 or WSL2? I found this issue which looks like it's saying that libpcap doesn't work at all on WSL1: microsoft/WSL#1349

@ashwin
Copy link
Author

ashwin commented Apr 2, 2021

@jvns I am using WSL1. I guess you can close this issue since libpcap isn't supported on WSL1.

@jvns jvns closed this as completed Apr 2, 2021
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

2 participants