How To Install libnetpacket-perl on Debian 9

In this tutorial we learn how to install libnetpacket-perl on Debian 9. libnetpacket-perl is modules to manipulate network packets at the protocol level

Introduction

In this tutorial we learn how to install libnetpacket-perl on Debian 9.

What is libnetpacket-perl

libnetpacket-perl is:

NetPacket provides a base class for a cluster of modules related to decoding and encoding of network protocols. Each NetPacket descendent module knows how to encode and decode packets for the network protocol it implements. Consult the documentation for the module in question for protocol-specific implementation.

Note that there is no inheritance in the NetPacket:: cluster of modules other than each protocol module being a NetPacket. This was seen to be too restrictive as imposing inheritance relationships (for example between the IP, UDP and TCP protocols) would make things like tunneling or other unusual situations difficult.

There are three methods to install libnetpacket-perl on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libnetpacket-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libnetpacket-perl using apt-get by running the following command:

sudo apt-get -y install libnetpacket-perl

Install libnetpacket-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libnetpacket-perl using apt by running the following command:

sudo apt -y install libnetpacket-perl

Install libnetpacket-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libnetpacket-perl using aptitude by running the following command:

sudo aptitude -y install libnetpacket-perl

How To Uninstall libnetpacket-perl on Debian 9

To uninstall only the libnetpacket-perl package we can use the following command:

sudo apt-get remove libnetpacket-perl

Uninstall libnetpacket-perl And Its Dependencies

To uninstall libnetpacket-perl and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove libnetpacket-perl

Remove libnetpacket-perl Configurations and Data

To remove libnetpacket-perl configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge libnetpacket-perl

Remove libnetpacket-perl configuration, data, and all of its dependencies

We can use the following command to remove libnetpacket-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libnetpacket-perl

Dependencies

libnetpacket-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libnetpacket-perl package on Debian 9 using different package management tools: apt, apt-get and aptitude.