How To Install lua-lpeg on Kali Linux

In this tutorial we learn how to install lua-lpeg on Kali Linux. lua-lpeg is LPeg library for the Lua language

Introduction

In this tutorial we learn how to install lua-lpeg on Kali Linux.

What is lua-lpeg

lua-lpeg is:

LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). PEGs look similar to regular expressions or context-free grammars in Backus-Naur form (BNF) notation. PEGs make a good replacement for regular expressions, because they are strictly more powerful. For example, a regular expression inherently cannot find matched pairs of parentheses, because it is not recursive, but a PEG can.

There are three methods to install lua-lpeg on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install lua-lpeg Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install lua-lpeg

Install lua-lpeg Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install lua-lpeg

Install lua-lpeg Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install lua-lpeg using aptitude by running the following command:

sudo aptitude -y install lua-lpeg

How To Uninstall lua-lpeg on Kali Linux

To uninstall only the lua-lpeg package we can use the following command:

sudo apt-get remove lua-lpeg

Uninstall lua-lpeg And Its Dependencies

To uninstall lua-lpeg and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove lua-lpeg

Remove lua-lpeg Configurations and Data

To remove lua-lpeg configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge lua-lpeg

Remove lua-lpeg configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge lua-lpeg

Dependencies

lua-lpeg have the following dependencies:

References

Summary

In this tutorial we learn how to install lua-lpeg package on Kali Linux using different package management tools: apt, apt-get and aptitude.