How To Install libgeo-distance-xs-perl on Ubuntu 18.04

In this tutorial we learn how to install libgeo-distance-xs-perl on Ubuntu 18.04. libgeo-distance-xs-perl is calculate distances and closest locations (XS version)

Introduction

In this tutorial we learn how to install libgeo-distance-xs-perl on Ubuntu 18.04.

What is libgeo-distance-xs-perl

libgeo-distance-xs-perl is:

Geo::Distance is a Perl library aiming to provide as many tools to make it as simple as possible to calculate distances between geographic points, and anything that can be derived from that. Currently there is support for finding the closest locations within a specified distance, to find the closest number of points to a specified point, and to do basic point-to-point distance calculations.

NB! The alternative GIS::Distance module is being worked on as a replacement for this module. In the near future Geo::Distance will become a lightweight wrapper around GIS::Distance so that legacy code benefits from fixes to GIS::Distance through the old Geo::Distance API. For any new development it is recommended to try use GIS::Distance.

This package provides the faster XS implementation.

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

sudo apt-get -y install libgeo-distance-xs-perl

Install libgeo-distance-xs-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libgeo-distance-xs-perl using apt by running the following command:

sudo apt -y install libgeo-distance-xs-perl

Install libgeo-distance-xs-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 libgeo-distance-xs-perl using aptitude by running the following command:

sudo aptitude -y install libgeo-distance-xs-perl

How To Uninstall libgeo-distance-xs-perl on Ubuntu 18.04

To uninstall only the libgeo-distance-xs-perl package we can use the following command:

sudo apt-get remove libgeo-distance-xs-perl

Uninstall libgeo-distance-xs-perl And Its Dependencies

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

sudo apt-get -y autoremove libgeo-distance-xs-perl

Remove libgeo-distance-xs-perl Configurations and Data

To remove libgeo-distance-xs-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libgeo-distance-xs-perl

Remove libgeo-distance-xs-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libgeo-distance-xs-perl

References

Summary

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