-
Notifications
You must be signed in to change notification settings - Fork 267
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
System.DllNotFoundException: libpcap.so #33
Comments
Hello.
What operating system?
You’ll need to install libpcap for Linux or npcap under windows to use
sharppcap.
Chris
…On Mon, Jan 1, 2018 at 5:49 AM Starbeamrainbowlabs ***@***.***> wrote:
Hello,
I've hit upon an exception when trying to use this library:
Unhandled Exception:
System.DllNotFoundException: libpcap.so
at (wrapper managed-to-native) SharpPcap.LibPcap.LibPcapSafeNativeMethods:pcap_findalldevs (intptr&,System.Text.StringBuilder)
at SharpPcap.LibPcap.LibPcapLiveDeviceList.GetDevices () [0x00017] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.LibPcap.LibPcapLiveDeviceList.Refresh () [0x0000c] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.LibPcap.LibPcapLiveDeviceList..ctor () [0x0000b] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.LibPcap.LibPcapLiveDeviceList.get_Instance () [0x00007] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.CaptureDeviceList..ctor () [0x00032] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.CaptureDeviceList.get_Instance () [0x00007] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at PacketCaptureMIDIDemo.PacketCapturer.LogDeviceList () [0x00002] in <426db04d9d0e45fe85d32d6e40196029>:0
at PacketCaptureMIDIDemo.MainClass.Main (System.String[] args) [0x00007] in <426db04d9d0e45fe85d32d6e40196029>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libpcap.so
at (wrapper managed-to-native) SharpPcap.LibPcap.LibPcapSafeNativeMethods:pcap_findalldevs (intptr&,System.Text.StringBuilder)
at SharpPcap.LibPcap.LibPcapLiveDeviceList.GetDevices () [0x00017] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.LibPcap.LibPcapLiveDeviceList.Refresh () [0x0000c] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.LibPcap.LibPcapLiveDeviceList..ctor () [0x0000b] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.LibPcap.LibPcapLiveDeviceList.get_Instance () [0x00007] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.CaptureDeviceList..ctor () [0x00032] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at SharpPcap.CaptureDeviceList.get_Instance () [0x00007] in <6f754ff0acd74248b20ed8bbfa5b7c57>:0
at PacketCaptureMIDIDemo.PacketCapturer.LogDeviceList () [0x00002] in <426db04d9d0e45fe85d32d6e40196029>:0
at PacketCaptureMIDIDemo.MainClass.Main (System.String[] args) [0x00007] in <426db04d9d0e45fe85d32d6e40196029>:0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#33>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABJ-AALgKYTbV9LE9cUmO3s604ccmRZ-ks5tGLgugaJpZM4RQC2p>
.
|
Hey, thanks for the quick reply! Oops, it looks like I haven't included my system details - I meant to do that! Here they are:
I see (amongst other things)
I've also tested this library on Artix Linux (A variant of Arch that doesn't use Thanks for the assistance! |
Ahh ok.
If you edit the sharppcap.dll.config file and put in the correct libpcap
file name that should fix it. Let me know if it doesn’t! I’d prefer a more
graceful fix but not sure that one exists that would cover all of the
library versions and names. Maybe the short libpcap.so would work but I’m
not sure that is present on all systems as a symlink.
…On Tue, Jan 2, 2018 at 6:42 AM Starbeamrainbowlabs ***@***.***> wrote:
Hey, thanks for the quick reply! Oops, it looks like I haven't included my
system details - I meant to do that! Here they are:
- OS: Ubuntu 17.04
- uname -a: Linux SomePCName 4.10.0-42-generic #46-Ubuntu SMP Mon Dec
4 14:38:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
- Packages installed: https://transfer.sh/WTC62/packages.txt.gz
I see (amongst other things) libpcap0.8 that's apparently automatically
installed when I do an apt search libpcap. Here's a snippet of the output
there:
libpcap-dev/zesty,zesty 1.8.1-3ubuntu1 all
development library for libpcap (transitional package)
libpcap0.8/zesty,now 1.8.1-3ubuntu1 amd64 [installed,automatic]
system interface for user-level packet capture
libpcap0.8-dbg/zesty 1.8.1-3ubuntu1 amd64
debugging symbols for libpcap0.8
libpcap0.8-dev/zesty 1.8.1-3ubuntu1 amd64
development library and header files for libpcap0.8
libwiretap-dev/zesty-updates,zesty-security 2.2.6+g32dac6a-2ubuntu0.17.04 amd64
network packet capture library -- development files
libwiretap6/zesty-updates,zesty-security,now 2.2.6+g32dac6a-2ubuntu0.17.04 amd64 [installed,automatic]
network packet capture library -- shared library
ncaptool/zesty 1.9.2-2.2 amd64
network capture tool
I've also tested this library on Artix Linux (A variant of Arch that
doesn't use systemd), and it works like charm - so I'm inclined to think
that I'm missing a package - but I'm not sure which one I'm missing.
Thanks for the assistance!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABJ-ADitTaXB_OY6K6v3f9914Cj-Ogohks5tGhYlgaJpZM4RQC2p>
.
|
Ah, thanks! Probing deeper my config file contained this:
...and while I had the following files:
....I didn't have a symlink called |
Platform: Docker Alpine Container and DotNet core I am getting dll not error |
Hey, @porscheme! Since this issue has been closed for a while, it might be worth opening a new issue with that information. Also, you can use the triple-backtick syntax to make something appear in a code block on GitHub, which would make that stack trace easier to read. Like this:
|
I raised a new issue #72
Thanks
From: Starbeamrainbowlabs<mailto:notifications@github.com>
Sent: Monday, June 17, 2019 2:19 PM
To: chmorgan/sharppcap<mailto:sharppcap@noreply.github.com>
Cc: porscheme<mailto:porscheme@live.com>; Mention<mailto:mention@noreply.github.com>
Subject: Re: [chmorgan/sharppcap] System.DllNotFoundException: libpcap.so (#33)
Hey, @porscheme<https://github.com/porscheme>! Since this issue has been closed for a while, it might be worth opening a new issue with that information.
Also, you can use the triple-backtick syntax to make something appear in a code block on GitHub, which would make that stack trace easier to read. Like this:
```
Enter stack trace here
```
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#33>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHDSKLGK3IAZMNTD67WF25TP275VTANCNFSM4EKAFWUQ>.
|
Hello,
I've hit upon an exception when trying to use this library:
The text was updated successfully, but these errors were encountered: