How To Install libpcap on Fedora 34

libpcap is A system-independent interface for user-level packet capture A system-independent interface for user-level packet capture

Introduction

In this tutorial we learn how to install libpcap on Fedora 34.

What is libpcap

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. Install libpcap if you need to do low-level network traffic monitoring on your network. libpcap 14 1.10.1 1.fc34 x86_64 171 k libpcap-1.10.1-1.fc34.src.rpm updates A system-independent interface for user-level packet capture https BSD with advertising 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. Install libpcap if you need to do low-level network traffic monitoring on your network.

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

Install libpcap on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install libpcap

Install libpcap on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo yum -y install libpcap

How To Uninstall libpcap on Fedora 34

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

sudo dnf remove libpcap

libpcap Package Contents on Fedora 34

/usr/lib/.build-id
/usr/lib/.build-id/17
/usr/lib/.build-id/17/32f261ae7b89dbd5996033540194165e82cfb0
/usr/lib64/libpcap.so.1
/usr/lib64/libpcap.so.1.10.1
/usr/share/doc/libpcap
/usr/share/doc/libpcap/CHANGES
/usr/share/doc/libpcap/CREDITS
/usr/share/doc/libpcap/README.md
/usr/share/licenses/libpcap
/usr/share/licenses/libpcap/LICENSE
/usr/share/man/man7/pcap-filter.7.gz
/usr/share/man/man7/pcap-linktype.7.gz
/usr/share/man/man7/pcap-tstamp.7.gz
/usr/lib/.build-id
/usr/lib/.build-id/22
/usr/lib/.build-id/22/a8d76a7ad3de05c9f2c629b61f85624ec5dda3
/usr/lib/libpcap.so.1
/usr/lib/libpcap.so.1.10.0
/usr/share/doc/libpcap
/usr/share/doc/libpcap/CHANGES
/usr/share/doc/libpcap/CREDITS
/usr/share/doc/libpcap/README.md
/usr/share/licenses/libpcap
/usr/share/licenses/libpcap/LICENSE
/usr/share/man/man7/pcap-filter.7.gz
/usr/share/man/man7/pcap-linktype.7.gz
/usr/share/man/man7/pcap-tstamp.7.gz
/usr/lib/.build-id
/usr/lib/.build-id/98
/usr/lib/.build-id/98/5f2ebbc776d3c825192e6707b48ddd3ac64e13
/usr/lib/libpcap.so.1
/usr/lib/libpcap.so.1.10.1
/usr/share/doc/libpcap
/usr/share/doc/libpcap/CHANGES
/usr/share/doc/libpcap/CREDITS
/usr/share/doc/libpcap/README.md
/usr/share/licenses/libpcap
/usr/share/licenses/libpcap/LICENSE
/usr/share/man/man7/pcap-filter.7.gz
/usr/share/man/man7/pcap-linktype.7.gz
/usr/share/man/man7/pcap-tstamp.7.gz
/usr/lib/.build-id
/usr/lib/.build-id/a2
/usr/lib/.build-id/a2/c19878a73ed093ae166c5caef7387ab6ee5c4e
/usr/lib64/libpcap.so.1
/usr/lib64/libpcap.so.1.10.0
/usr/share/doc/libpcap
/usr/share/doc/libpcap/CHANGES
/usr/share/doc/libpcap/CREDITS
/usr/share/doc/libpcap/README.md
/usr/share/licenses/libpcap
/usr/share/licenses/libpcap/LICENSE
/usr/share/man/man7/pcap-filter.7.gz
/usr/share/man/man7/pcap-linktype.7.gz
/usr/share/man/man7/pcap-tstamp.7.gz

References

Summary

In this tutorial we learn how to install libpcap on Fedora 34 using yum and dnf.