How To Install libapache2-authcookie-perl on Ubuntu 18.04

In this tutorial we learn how to install libapache2-authcookie-perl on Ubuntu 18.04. libapache2-authcookie-perl is Perl Authentication and Authorization via cookies

Introduction

In this tutorial we learn how to install libapache2-authcookie-perl on Ubuntu 18.04.

What is libapache2-authcookie-perl

libapache2-authcookie-perl is:

This module is for mod_perl version 2. If you are running mod_perl version 1, you should be using Apache::AuthCookie instead.

Apache2::AuthCookie allows you to intercept a user’s first unauthenticated access to a protected document. The user will be presented with a custom form where they can enter authentication credentials. The credentials are posted to the server where AuthCookie verifies them and returns a session key.

The session key is returned to the user’s browser as a cookie. As a cookie, the browser will pass the session key on every subsequent accesses. AuthCookie will verify the session key and re-authenticate the user.

There are three methods to install libapache2-authcookie-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 libapache2-authcookie-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 libapache2-authcookie-perl using apt-get by running the following command:

sudo apt-get -y install libapache2-authcookie-perl

Install libapache2-authcookie-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libapache2-authcookie-perl

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

sudo aptitude -y install libapache2-authcookie-perl

How To Uninstall libapache2-authcookie-perl on Ubuntu 18.04

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

sudo apt-get remove libapache2-authcookie-perl

Uninstall libapache2-authcookie-perl And Its Dependencies

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

sudo apt-get -y autoremove libapache2-authcookie-perl

Remove libapache2-authcookie-perl Configurations and Data

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

sudo apt-get -y purge libapache2-authcookie-perl

Remove libapache2-authcookie-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libapache2-authcookie-perl

References

Summary

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