How To Install re2c on Debian 9
Introduction
In this tutorial we learn how to install re2c
on Debian 9.
What is re2c
re2c is:
re2c is a great tool for writing fast and flexible lexers. Unlike other such tools, re2c concentrates solely on generating efficient code for matching regular expressions. Not only does this singleness make re2c more suitable for a wider variety of applications, it allows one to generate scanners which approach hand-crafted ones in terms of size and speed.
There are three methods to install re2c
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 re2c Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install re2c
using apt-get
by running the following command:
sudo apt-get -y install re2c
Install re2c Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install re2c
using apt
by running the following command:
sudo apt -y install re2c
Install re2c 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 re2c
using aptitude
by running the following command:
sudo aptitude -y install re2c
How To Uninstall re2c on Debian 9
To uninstall only the re2c
package we can use the following command:
sudo apt-get remove re2c
Uninstall re2c And Its Dependencies
To uninstall re2c
and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove re2c
Remove re2c Configurations and Data
To remove re2c
configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge re2c
Remove re2c configuration, data, and all of its dependencies
We can use the following command to remove re2c
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge re2c
Dependencies
re2c have the following dependencies:
References
Summary
In this tutorial we learn how to install re2c
package on Debian 9 using different package management tools: apt
, apt-get
and aptitude
.