How To Install libpcap-devel on CentOS 7

In this tutorial we learn how to install libpcap-devel on CentOS 7. libpcap-devel is Libraries and header files for the libpcap library

Introduction

In this tutorial we learn how to install libpcap-devel on CentOS 7.

What is libpcap-devel

Libpcap provides a portable framework for low-level network monitoring. Libpcap can provide network statistics collection, security monitoring and network debugging. Since almost every system vendor provides a different interface for packet capture, the libpcap authors created this system-independent API to ease in porting and to alleviate the need for several system-dependent packet capture modules in each application. This package provides the libraries, include files, and other resources needed for developing libpcap applications. Libpcap provides a portable framework for low-level network monitoring. Libpcap can provide network statistics collection, security monitoring and network debugging. Since almost every system vendor provides a different interface for packet capture, the libpcap authors created this system-independent API to ease in porting and to alleviate the need for several system-dependent packet capture modules in each application. This package provides the libraries, include files, and other resources needed for developing libpcap applications.

We can use yum or dnf to install libpcap-devel on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install libpcap-devel.

Install libpcap-devel on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install libpcap-devel using yum by running the following command:

sudo yum -y install libpcap-devel

Install libpcap-devel on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install libpcap-devel using dnf by running the following command:

sudo dnf -y install libpcap-devel

How To Uninstall libpcap-devel on CentOS 7

To uninstall only the libpcap-devel package we can use the following command:

sudo dnf remove libpcap-devel

References

Summary

In this tutorial we learn how to install libpcap-devel on CentOS 7 using yum and dnf.