I run an application uses Pcap4J on Windows 10. It worked correct (with Admin privileges).
When I run the same application on Linux (Cent OS 7) I got this error:
java.lang.UnsatisfiedLinkError: Unable to load library 'pcap': Native library (linux-x86-64/libpcap.so) not found in resource path ([file:/tmp/spark-e5c4a3c6-8ee1-4b60-9fc0-941cdc83f521/userFiles-3b9fc272-3010-4467-83cb-50378b87e4aa/my_app.jar])
I tried:
- Install libcap:
yum install libcap-devel
- Run with root privileges
- Search
libpcap.so
file:- in libpcap-1.8.1.tar.gz, tcpdump-4.9.0.tar.gz and Pcap4J repo
- in Linux:
find / -name libpcap.so
- for download in google
- in jars in .m2 and .ivy2 caches