How To Install libhttp-daemon-perl on Debian 10

Learn how to install libhttp-daemon-perl on Debian 10 with this tutorial. libhttp-daemon-perl is simple http server class

Introduction

In this tutorial we learn how to install libhttp-daemon-perl on Debian 10.

What is libhttp-daemon-perl

libhttp-daemon-perl is:

Instances of the HTTP::Daemon class are HTTP/1.1 servers that listen on a socket for incoming requests. The HTTP::Daemon is a subclass of IO::Socket::INET, so you can perform socket operations directly on it too.

The accept() method will return when a connection from a client is available. The returned value will be an HTTP::Daemon::ClientConn object which is another IO::Socket::INET subclass. Calling the get_request() method on this object will read data from the client and return an HTTP::Request object. The ClientConn object also provide methods to send back various responses.

This HTTP daemon does not fork(2) for you. Your application, i.e. the user of the HTTP::Daemon is responsible for forking if that is desirable. Also note that the user is responsible for generating responses that conform to the HTTP/1.1 protocol.

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

Install libhttp-daemon-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 libhttp-daemon-perl using apt-get by running the following command:

sudo apt-get -y install libhttp-daemon-perl

Install libhttp-daemon-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libhttp-daemon-perl

Install libhttp-daemon-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 libhttp-daemon-perl using aptitude by running the following command:

sudo aptitude -y install libhttp-daemon-perl

How To Uninstall libhttp-daemon-perl on Debian 10

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

sudo apt-get remove libhttp-daemon-perl

Uninstall libhttp-daemon-perl And Its Dependencies

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

sudo apt-get -y autoremove libhttp-daemon-perl

Remove libhttp-daemon-perl Configurations and Data

To remove libhttp-daemon-perl configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge libhttp-daemon-perl

Remove libhttp-daemon-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libhttp-daemon-perl

Dependencies

libhttp-daemon-perl have the following dependencies:

References

Summary

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