How To Install libsocket-getaddrinfo-perl on Debian 10

Learn how to install libsocket-getaddrinfo-perl on Debian 10 with this tutorial. libsocket-getaddrinfo-perl is module implementing getaddrinfo and getnameinfo

Introduction

In this tutorial we learn how to install libsocket-getaddrinfo-perl on Debian 10.

What is libsocket-getaddrinfo-perl

libsocket-getaddrinfo-perl is:

Socket::GetAddrInfo provides a Perl implementation of the getaddrinfo and getnameinfo functions as described in RFC 2553. These functions are useful for converting between a pair of host name/service name and socket addresses, or vice versa.

This module uses underlying C code to do most of the work if possible, but can also fall back on some mostly-compatible emulation code written in Perl. This means that this module is a fairly portable implementation of these functions.

As of Perl version 5.14.0, Perl already supports getaddrinfo' in core. On such a system, this module simply uses the functions provided by Socket’, and does not need to use its own compiled XS, or pure-perl legacy emulation.

As Socket' in core now provides all the functions also provided by this module, it is likely this may be the last released version of this module. And code currently using this module would be advised to switch to using core Socket’ instead.

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

sudo apt-get -y install libsocket-getaddrinfo-perl

Install libsocket-getaddrinfo-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libsocket-getaddrinfo-perl

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

sudo aptitude -y install libsocket-getaddrinfo-perl

How To Uninstall libsocket-getaddrinfo-perl on Debian 10

To uninstall only the libsocket-getaddrinfo-perl package we can use the following command:

sudo apt-get remove libsocket-getaddrinfo-perl

Uninstall libsocket-getaddrinfo-perl And Its Dependencies

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

sudo apt-get -y autoremove libsocket-getaddrinfo-perl

Remove libsocket-getaddrinfo-perl Configurations and Data

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

sudo apt-get -y purge libsocket-getaddrinfo-perl

Remove libsocket-getaddrinfo-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libsocket-getaddrinfo-perl

Dependencies

libsocket-getaddrinfo-perl have the following dependencies:

References

Summary

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