0

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:

  1. Install libcap: yum install libcap-devel
  2. Run with root privileges
  3. Search libpcap.so file:
Aleks Ya
  • 859
  • 5
  • 15
  • 27

1 Answers1

0

I found solution.

Instead of developer package (libcap-devel) I should install usual package:

yum install libpcap.x86_64

The name of the package may be different. You can list all avaliable packages by command:

 yum list available | grep libpcap
Aleks Ya
  • 859
  • 5
  • 15
  • 27