How To Install libnet-dns-async-perl on Ubuntu 18.04

In this tutorial we learn how to install libnet-dns-async-perl on Ubuntu 18.04. libnet-dns-async-perl is Asynchronous DNS helper for high volume perl applications

Introduction

In this tutorial we learn how to install libnet-dns-async-perl on Ubuntu 18.04.

What is libnet-dns-async-perl

libnet-dns-async-perl is:

Net::DNS::Async is a fire-and-forget asynchronous DNS helper. That is, the user application adds DNS questions to the helper, and the callback will be called at some point in the future without further intervention from the user application. The application need not handle selects, timeouts, waiting for a response or any other such issues.

If the same query is added to the queue more than once, the module may combine the queries; that is, it will perform the query only once, and will call each callback registered for that query in turn, passing the same Net::DNS::Response object to each query. For this reason, you should not modify the Net::DNS::Response object in any way lest you break things horribly for a subsequent callback.

This module is similar in principle to POE::Component::Client::DNS, but does not require POE.

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

sudo apt-get -y install libnet-dns-async-perl

Install libnet-dns-async-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libnet-dns-async-perl

Install libnet-dns-async-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 libnet-dns-async-perl using aptitude by running the following command:

sudo aptitude -y install libnet-dns-async-perl

How To Uninstall libnet-dns-async-perl on Ubuntu 18.04

To uninstall only the libnet-dns-async-perl package we can use the following command:

sudo apt-get remove libnet-dns-async-perl

Uninstall libnet-dns-async-perl And Its Dependencies

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

sudo apt-get -y autoremove libnet-dns-async-perl

Remove libnet-dns-async-perl Configurations and Data

To remove libnet-dns-async-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libnet-dns-async-perl

Remove libnet-dns-async-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libnet-dns-async-perl

References

Summary

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