How To Install re2c on Ubuntu 20.04
Introduction
In this tutorial we learn how to install re2c
on Ubuntu 20.04.
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.
Package: re2c Architecture: amd64 Version: 1.3-1build1 Multi-Arch: foreign Priority: optional Section: devel Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: JCF Ploemen (jcfp) [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1229 Depends: libc6 (>= 2.14), libgcc-s1 (>= 3.0), libstdc++6 (>= 5.2) Filename: pool/main/r/re2c/re2c_1.3-1build1_amd64.deb Size: 258632 MD5sum: eae640ad2efc637ba69d4e736f115fc1 SHA1: c64fef3fe889dc5f294cb688607e20aadd13d462 SHA256: 82de43cb11e45827e47f3fa97c0ea1a2bf523a5c45dd373b18cb74355f698650 Homepage: https://re2c.org Description-en: tool for generating fast C-based recognizers 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 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 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 Ubuntu. 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 Ubuntu 20.04
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 Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove re2c
Remove re2c Configurations and Data
To remove re2c
configuration and data from Ubuntu 20.04 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
References
Summary
In this tutorial we learn how to install re2c
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.