How To Install libstring-expand-perl on Debian 9
Introduction
In this tutorial we learn how to install libstring-expand-perl
on Debian 9.
What is libstring-expand-perl
libstring-expand-perl is:
String::Expand implements utility functions for expanding embedded variables in a string. Variable references are embedded in strings in a similar form to the Bourne shell, namely, in the form $NAME or ${OTHER_NAME}. In the former case, the NAME must consist of a capital letter or underscore, and may be followed by zero or more capital letters, digits or underscores. In the latter case, the name can consist of any characters, but will be terminated by the first close brace character ‘}’.
This is especially useful if you want to expand environment variables inside strings.
The string may also contain literal dollar marks, escaped by $, and literal escape marks, escaped by \. These will be converted to $ and \ respectively on return.
While there are many other modules that also provide expansion such as this, this module provides the function expand_strings(), which will perform variable expansions in all the values in a given hash, where values can refer to other values within the same hash.
There are three methods to install libstring-expand-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 libstring-expand-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 libstring-expand-perl
using apt-get
by running the following command:
sudo apt-get -y install libstring-expand-perl
Install libstring-expand-perl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libstring-expand-perl
using apt
by running the following command:
sudo apt -y install libstring-expand-perl
Install libstring-expand-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 libstring-expand-perl
using aptitude
by running the following command:
sudo aptitude -y install libstring-expand-perl
How To Uninstall libstring-expand-perl on Debian 9
To uninstall only the libstring-expand-perl
package we can use the following command:
sudo apt-get remove libstring-expand-perl
Uninstall libstring-expand-perl And Its Dependencies
To uninstall libstring-expand-perl
and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove libstring-expand-perl
Remove libstring-expand-perl Configurations and Data
To remove libstring-expand-perl
configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge libstring-expand-perl
Remove libstring-expand-perl configuration, data, and all of its dependencies
We can use the following command to remove libstring-expand-perl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libstring-expand-perl
Dependencies
libstring-expand-perl have the following dependencies:
References
Summary
In this tutorial we learn how to install libstring-expand-perl
package on Debian 9 using different package management tools: apt
, apt-get
and aptitude
.