How To Install libtree-redblack-perl on Debian 9

In this tutorial we learn how to install libtree-redblack-perl on Debian 9. libtree-redblack-perl is Perl implementation of Red/Black tree, a balanced tree

Introduction

In this tutorial we learn how to install libtree-redblack-perl on Debian 9.

What is libtree-redblack-perl

libtree-redblack-perl is:

This is a demonstration package, showing the performance differences between different methods of data storage and accessing. It contains a perl implementation of the Red/Black tree algorithm found in the book “Algorithms”, by Cormen, Leiserson & Rivest (more commonly known as “CLR” or “The White Book”). A Red/Black tree is a binary tree which remains “balanced”- that is, the longest length from root to a node is at most one more than the shortest such length. It is fairly efficient; no operation takes more than O(lg(n)) time.

An example perl script is contained in the documentation directory, which would show the different run times using hash table, linear or tree structure.

There are three methods to install libtree-redblack-perl on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libtree-redblack-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 libtree-redblack-perl using apt-get by running the following command:

sudo apt-get -y install libtree-redblack-perl

Install libtree-redblack-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libtree-redblack-perl

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

sudo aptitude -y install libtree-redblack-perl

How To Uninstall libtree-redblack-perl on Debian 9

To uninstall only the libtree-redblack-perl package we can use the following command:

sudo apt-get remove libtree-redblack-perl

Uninstall libtree-redblack-perl And Its Dependencies

To uninstall libtree-redblack-perl and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove libtree-redblack-perl

Remove libtree-redblack-perl Configurations and Data

To remove libtree-redblack-perl configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge libtree-redblack-perl

Remove libtree-redblack-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libtree-redblack-perl

Dependencies

libtree-redblack-perl have the following dependencies:

References

Summary

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