How To Install libtree-simple-perl on Ubuntu 20.04
Introduction
In this tutorial we learn how to install libtree-simple-perl
on Ubuntu 20.04.
What is libtree-simple-perl
libtree-simple-perl is:
Tree::Simple is a fully object-oriented implementation of a simple n-ary tree. It is built upon the concept of parent-child relationships, so therefore every Tree::Simple object has both a parent and a set of children (who themselves may have children, and so on). Every Tree::Simple object also has siblings, as they are just the children of their immediate parent.
It can be used to model hierarchal information such as a file-system, the organizational structure of a company, an object inheritance hierarchy, versioned files from a version control system or even an abstract syntax tree for use in a parser. It makes no assumptions as to your intended usage, but instead simply provides the structure and means of accessing and traversing said structure.
This module uses exceptions and a minimal Design By Contract style. All method arguments are required unless specified in the documentation, if a required argument is not defined an exception will usually be thrown. Many arguments are also required to be of a specific type, for instance the $parent argument to the constructor must be a Tree::Simple object or an object derived from Tree::Simple, otherwise an exception is thrown.
There are three methods to install libtree-simple-perl
on Ubuntu 20.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 libtree-simple-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-simple-perl
using apt-get
by running the following command:
sudo apt-get -y install libtree-simple-perl
Install libtree-simple-perl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libtree-simple-perl
using apt
by running the following command:
sudo apt -y install libtree-simple-perl
Install libtree-simple-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 libtree-simple-perl
using aptitude
by running the following command:
sudo aptitude -y install libtree-simple-perl
How To Uninstall libtree-simple-perl on Ubuntu 20.04
To uninstall only the libtree-simple-perl
package we can use the following command:
sudo apt-get remove libtree-simple-perl
Uninstall libtree-simple-perl And Its Dependencies
To uninstall libtree-simple-perl
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove libtree-simple-perl
Remove libtree-simple-perl Configurations and Data
To remove libtree-simple-perl
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge libtree-simple-perl
Remove libtree-simple-perl configuration, data, and all of its dependencies
We can use the following command to remove libtree-simple-perl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libtree-simple-perl
References
Summary
In this tutorial we learn how to install libtree-simple-perl
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.