How To Install libmail-rfc822-address-perl on Ubuntu 18.04

In this tutorial we learn how to install libmail-rfc822-address-perl on Ubuntu 18.04. libmail-rfc822-address-perl is Perl extension for validating email addresses

Introduction

In this tutorial we learn how to install libmail-rfc822-address-perl on Ubuntu 18.04.

What is libmail-rfc822-address-perl

libmail-rfc822-address-perl is:

Mail::RFC822::Address validates email addresses against the grammar described in RFC 822 using regular expressions. How to validate a user supplied email address is a FAQ (see perlfaq9): the only sure way to see if a supplied email address is genuine is to send an email to it and see if the user receives it. The one useful check that can be performed on an address is to check that the email address is syntactically valid. That is what this module does.

This module is functionally equivalent to RFC::RFC822::Address, but uses regular expressions rather than the Parse::RecDescent parser. This means that startup time is greatly reduced making it suitable for use in transient scripts such as CGI scripts.

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

sudo apt-get -y install libmail-rfc822-address-perl

Install libmail-rfc822-address-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libmail-rfc822-address-perl

Install libmail-rfc822-address-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 libmail-rfc822-address-perl using aptitude by running the following command:

sudo aptitude -y install libmail-rfc822-address-perl

How To Uninstall libmail-rfc822-address-perl on Ubuntu 18.04

To uninstall only the libmail-rfc822-address-perl package we can use the following command:

sudo apt-get remove libmail-rfc822-address-perl

Uninstall libmail-rfc822-address-perl And Its Dependencies

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

sudo apt-get -y autoremove libmail-rfc822-address-perl

Remove libmail-rfc822-address-perl Configurations and Data

To remove libmail-rfc822-address-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libmail-rfc822-address-perl

Remove libmail-rfc822-address-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libmail-rfc822-address-perl

References

Summary

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