How To Install smarty-lexer on Debian 10

Learn how to install smarty-lexer on Debian 10 with this tutorial. smarty-lexer is Smarty Lexer/Parser generator

Introduction

In this tutorial we learn how to install smarty-lexer on Debian 10.

What is smarty-lexer

smarty-lexer is:

The smarty-lexer package is used to generate the lexer and parser class files for Debian package smarty3.

To generate the template lexer and parser run Create_Template_Parser.php. It will create smarty_internal_templatelexer.php from smarty_internal_templatelexer.plex smarty_internal_templateparser.php from smarty_internal_templateparser.y

To generate the config file lexer and parser run Create_Template_Parser.php. It will create smarty_internal_configfilelexer.php from smarty_internal_configfilelexer.plex smarty_internal_configfileparser.php from smarty_internal_configfileparser.y

There are three methods to install smarty-lexer 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 smarty-lexer Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install smarty-lexer using apt-get by running the following command:

sudo apt-get -y install smarty-lexer

Install smarty-lexer Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install smarty-lexer using apt by running the following command:

sudo apt -y install smarty-lexer

Install smarty-lexer 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 smarty-lexer using aptitude by running the following command:

sudo aptitude -y install smarty-lexer

How To Uninstall smarty-lexer on Debian 10

To uninstall only the smarty-lexer package we can use the following command:

sudo apt-get remove smarty-lexer

Uninstall smarty-lexer And Its Dependencies

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

sudo apt-get -y autoremove smarty-lexer

Remove smarty-lexer Configurations and Data

To remove smarty-lexer configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge smarty-lexer

Remove smarty-lexer configuration, data, and all of its dependencies

We can use the following command to remove smarty-lexer configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge smarty-lexer

Dependencies

smarty-lexer have the following dependencies:

References

Summary

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