I installed jnetpcap but it showed error that libpcap.so is not found, so I used
sudo apt-get install libpcap-dev
but when I grep libpcap in /lib and /usr/lib it is not there, am I missing something?
I installed jnetpcap but it showed error that libpcap.so is not found, so I used
sudo apt-get install libpcap-dev
but when I grep libpcap in /lib and /usr/lib it is not there, am I missing something?
If you need the library file, you don't have to install the development package. libpcap-dev is the package containing the files needed to develop and compile own programs using the functionalities offered by libpcap.
The dynamic library, the .so file, is located in a package which doesn't have -dev in its name.
On my system, Ubuntu 13.10, it is located in the libpcap0.8 package.
So I did
$ sudo apt-get install libpcap0.8
and then looked if the .so file was well installed and ready to use by the system :
$ sudo ldconfig -p|grep libpcap
libpcap.so.0.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libpcap.so.0.8
Please note that using ldconfig -p and searching for the library in its output looks more reliable to me because the .so file are not always installed in /lib or /usr/lib as you can see.
Of course, displaying the list of files provided by the package can show you in which directory the .so file is installed :
$ dpkg -L libpcap0.8
A last word, if the output of ldconfig -p doesn't show the library in its output, you can regenerate the list of shared libraries by typing :
$ sudo ldconfig