How To Install libdaemon-control-perl on Ubuntu 18.04

In this tutorial we learn how to install libdaemon-control-perl on Ubuntu 18.04. libdaemon-control-perl is module for creating init scripts in Perl

Introduction

In this tutorial we learn how to install libdaemon-control-perl on Ubuntu 18.04.

What is libdaemon-control-perl

libdaemon-control-perl is:

Daemon::Control provides a library for creating init scripts in Perl. Your Perl script just needs to set the accessors for what and how you want something to run and the library takes care of the rest.

You can launch programs through the shell (/usr/sbin/my_program) or launch Perl code itself into a daemon mode. Single and double fork methods are supported and in double-fork mode all the things you would expect like reopening STDOUT/STDERR, switching UID/GID are supported.

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

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

sudo apt-get -y install libdaemon-control-perl

Install libdaemon-control-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libdaemon-control-perl

Install libdaemon-control-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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install libdaemon-control-perl

How To Uninstall libdaemon-control-perl on Ubuntu 18.04

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

sudo apt-get remove libdaemon-control-perl

Uninstall libdaemon-control-perl And Its Dependencies

To uninstall libdaemon-control-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libdaemon-control-perl

Remove libdaemon-control-perl Configurations and Data

To remove libdaemon-control-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libdaemon-control-perl

Remove libdaemon-control-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libdaemon-control-perl

References

Summary

In this tutorial we learn how to install libdaemon-control-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.