In this tutorial, we will walk through the steps to resolve the “pcap library not found” error that you may encounter when installing Reaver on your Ubuntu system.
Reaver is a popular tool for testing the security of Wi-Fi Protected Setup (WPS) networks. However, when installing Reaver, you might come across an error message stating “pcap library not found”. This error arises due to the absence of the libpcap library, a crucial dependency for Reaver.
Understanding the Error
The libpcap library provides a high-level interface to network packet capture systems. When Reaver can’t locate this library, it throws the “pcap library not found” error.
Fixing the Error
There are several ways to fix this error. We’ll explore three solutions in this tutorial.
Solution 1: Install libpcap-dev
The first solution is to install the libpcap development package. Open your terminal and run the following command:
sudo apt-get install libpcap-dev
sudo command allows you to run commands with the security privileges of the superuser, while
apt-get install is used to install packages.
libpcap-dev is the package that we want to install.
Solution 2: Install libpcap0.8-dev
If the first solution doesn’t work, you can try installing the libpcap0.8 development package. Run the following command in your terminal:
sudo apt-get install libpcap0.8-dev
Solution 3: Configure the Installation with Correct Paths
If you’re using a Debian-based distribution, you can try configuring the installation with the correct paths for libpcap. Use the following command:
./configure --with-pcap-lib=/usr/lib/i386-linux-gnu/ --with-pcap-inc=/usr/include/pcap/
Replace the paths with the actual paths on your system. The
./configure command is used to prepare the software to be built on a specific system.
--with-pcap-inc are options that specify the locations of the libpcap library and include files, respectively.
If none of the above solutions work, you can try the following additional steps:
- Run the command
dpkg --listfiles libpcap0.8-devto find the actual paths for the libpcap library on your system. The
dpkg --listfilescommand lists the files installed to your system from a particular package.
- Update the configure command with the correct paths obtained from the previous step.
- Remove any faulty includes by removing the line causing the error
./base/pcap-snoop.c:52:21: fatal error: net/bpf.h: No such file or directory.
Remember to run
./configure again after trying any of the solutions. This should resolve the “pcap library not found” error and allow you to proceed with the installation of Reaver.
In this tutorial, we’ve explored three solutions to the “pcap library not found” error when installing Reaver on Ubuntu. By ensuring that the libpcap library is properly installed and configured, you should be able to successfully install Reaver and start testing the security of WPS networks.
Reaver is a tool used for testing the security of Wi-Fi Protected Setup (WPS) networks. It is designed to exploit vulnerabilities in WPS implementations and retrieve the WPA/WPA2 passphrase of a wireless network.
The "pcap library not found" error occurs because the libpcap library, which is a dependency for Reaver, is missing from your system. Reaver requires this library to interface with network packet capture systems.
There are a few solutions you can try to fix this error. First, you can install the libpcap development package by running
sudo apt-get install libpcap-dev in the terminal. If that doesn’t work, you can try installing the libpcap0.8 development package with
sudo apt-get install libpcap0.8-dev. Another option is to configure the installation with the correct paths for libpcap using the
You can use the
dpkg --listfiles libpcap0.8-dev command to find the actual paths for the libpcap library on your system. This command will list the files installed by the libpcap0.8-dev package, which includes the library files.
If none of the solutions mentioned in the tutorial work, you can try updating the configure command with the correct paths obtained from the previous step. Additionally, you can remove any faulty includes by deleting the line causing the error. Remember to run
./configure again after trying any of these steps.