How To Install re2c on CentOS 8
Introduction
In this tutorial we learn how to install re2c
on CentOS 8.
What is re2c
re2c is a tool for writing very fast and very flexible scanners. Unlike any other such tool, re2c focuses on generating high efficient code for regular expression matching. As a result this allows a much broader range of use than any traditional lexer offers. And Last but not least re2c generates warning free code that is equal to hand-written code in terms of size, speed and quality.
We can use yum
or dnf
to install re2c
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install re2c.
Install re2c on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install re2c
using dnf
by running the following command:
sudo dnf -y install re2c
Install re2c on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install re2c
using yum
by running the following command:
sudo yum -y install re2c
How To Uninstall re2c on CentOS 8
To uninstall only the re2c
package we can use the following command:
sudo dnf remove re2c
re2c Package Contents on CentOS 8
/usr/bin/re2c
/usr/lib/.build-id
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/634f7fd41a6fa07a4f63f891205a195c96ffbf
/usr/share/doc/re2c
/usr/share/doc/re2c/CHANGELOG
/usr/share/doc/re2c/README
/usr/share/doc/re2c/examples
/usr/share/doc/re2c/examples/basemmap.c
/usr/share/doc/re2c/examples/c.re
/usr/share/doc/re2c/examples/cmmap.re
/usr/share/doc/re2c/examples/cnokw.re
/usr/share/doc/re2c/examples/cunroll.re
/usr/share/doc/re2c/examples/input_custom
/usr/share/doc/re2c/examples/input_custom/fixed.re
/usr/share/doc/re2c/examples/input_custom/simple
/usr/share/doc/re2c/examples/input_custom/simple/README
/usr/share/doc/re2c/examples/input_custom/simple/default.re
/usr/share/doc/re2c/examples/input_custom/simple/fgetc.re
/usr/share/doc/re2c/examples/input_custom/simple/istringstream.re
/usr/share/doc/re2c/examples/modula.re
/usr/share/doc/re2c/examples/pp-c.re
/usr/share/doc/re2c/examples/push.re
/usr/share/doc/re2c/examples/repeater.re
/usr/share/doc/re2c/examples/rexx
/usr/share/doc/re2c/examples/rexx/README
/usr/share/doc/re2c/examples/rexx/rexx.l
/usr/share/doc/re2c/examples/rexx/scanio.c
/usr/share/doc/re2c/examples/sample.re
/usr/share/doc/re2c/examples/simple.re
/usr/share/doc/re2c/lessons
/usr/share/doc/re2c/lessons/001_upn_calculator
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_001.c
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_001.re
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_002.c
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_002.re
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_003.c
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_003.re
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_004.c
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_004.re
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_005.c
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_005.re
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_006.s.c
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_006.s.re
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_007.b.c
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_007.b.re
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_008.b.c
/usr/share/doc/re2c/lessons/001_upn_calculator/calc_008.b.re
/usr/share/doc/re2c/lessons/001_upn_calculator/readme.txt
/usr/share/doc/re2c/lessons/001_upn_calculator/windows
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/BuildAndRun.bat
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/HiResTimer.h
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/TestRe2c-2005.sln
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/TestRe2c-2005.vcproj
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/TestRe2c.dsp
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/TestRe2c.dsw
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/TestRe2c.sln
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/TestRe2c.vcproj
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/main.b.c
/usr/share/doc/re2c/lessons/001_upn_calculator/windows/main.b.re
/usr/share/doc/re2c/lessons/002_strip_comments
/usr/share/doc/re2c/lessons/002_strip_comments/readme.txt
/usr/share/doc/re2c/lessons/002_strip_comments/strip_001.s.c
/usr/share/doc/re2c/lessons/002_strip_comments/strip_001.s.re
/usr/share/doc/re2c/lessons/002_strip_comments/strip_002.s.c
/usr/share/doc/re2c/lessons/002_strip_comments/strip_002.s.re
/usr/share/doc/re2c/lessons/002_strip_comments/strip_003.b.c
/usr/share/doc/re2c/lessons/002_strip_comments/strip_003.b.re
/usr/share/doc/re2c/lessons/readme.txt
/usr/share/doc/re2c/loplas.ps
/usr/share/doc/re2c/sample.bib
/usr/share/man/man1/re2c.1.gz
References
Summary
In this tutorial we learn how to install re2c
on CentOS 8 using yum and dnf.