How To Install ragel on CentOS 8

ragel is Finite state machine compiler

Introduction

In this tutorial we learn how to install ragel on CentOS 8.

What is ragel

Ragel compiles executable finite state machines from regular languages. Ragel targets C, C++ and ASM. Ragel state machines can not only recognize byte sequences as regular expression machines do, but can also execute code at arbitrary points in the recognition of a regular language. Code embedding is done using inline operators that do not disrupt the regular language syntax.

We can use yum or dnf to install ragel on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install ragel.

Install ragel 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 ragel using dnf by running the following command:

sudo dnf -y install ragel

Install ragel 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 ragel using yum by running the following command:

sudo yum -y install ragel

How To Uninstall ragel on CentOS 8

To uninstall only the ragel package we can use the following command:

sudo dnf remove ragel

ragel Package Contents on CentOS 8

/usr/bin/ragel
/usr/bin/ragel-asm
/usr/bin/ragel-c
/usr/bin/ragel-crack
/usr/bin/ragel-csharp
/usr/bin/ragel-d
/usr/bin/ragel-go
/usr/bin/ragel-java
/usr/bin/ragel-js
/usr/bin/ragel-julia
/usr/bin/ragel-ocaml
/usr/bin/ragel-ruby
/usr/bin/ragel-rust
/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/6b48cda32ec739d11a82f8a9ed78696d50acf7
/usr/lib/.build-id/26
/usr/lib/.build-id/26/186f3a33fd061732215bc2a9a30d76a3b567e2
/usr/lib/.build-id/39
/usr/lib/.build-id/39/3cbe260ccf5b1ad782839d884b9a4b97c4f5e8
/usr/lib/.build-id/4a
/usr/lib/.build-id/4a/ddf1ae331c8834181bf7c42f272fa99bfc0c6f
/usr/lib/.build-id/59
/usr/lib/.build-id/59/5610461ebf63473512bf4875888b655f70f063
/usr/lib/.build-id/76
/usr/lib/.build-id/76/1dcb07ecbab448bcb58deeb8167946b249e956
/usr/lib/.build-id/85
/usr/lib/.build-id/85/3653700e271ec072faea793832aef41f07e490
/usr/lib/.build-id/89
/usr/lib/.build-id/89/a4e1948459bb505dcc4c324eb68ba28da5c4e4
/usr/lib/.build-id/8d
/usr/lib/.build-id/8d/8f312dc1edcdb9ddd1c6b9ac54d46bee8bce31
/usr/lib/.build-id/8f
/usr/lib/.build-id/8f/7b7941144ed7d6ff12c08ce305c701fe93c900
/usr/lib/.build-id/a0
/usr/lib/.build-id/a0/d8ca2f212734effaa69990b1833edc77a3762d
/usr/lib/.build-id/a9
/usr/lib/.build-id/a9/04e4c6a4b74bb6b89bf800f70f03cad3bc13e4
/usr/lib/.build-id/ea
/usr/lib/.build-id/ea/3d8520ac9a6bb47a306321babff00b7c992374
/usr/lib/.build-id/ec
/usr/lib/.build-id/ec/281659e56d669d7abe9de2a7606bc7957113b5
/usr/lib/.build-id/fd
/usr/lib/.build-id/fd/49bc134d938b224ffbb2ec7a4cb8c36acf6459
/usr/lib64/libfsm.so.0
/usr/lib64/libfsm.so.0.0.0
/usr/lib64/libragel.so.0
/usr/lib64/libragel.so.0.0.0
/usr/share/doc/ragel
/usr/share/doc/ragel/CREDITS
/usr/share/doc/ragel/ChangeLog
/usr/share/licenses/ragel
/usr/share/licenses/ragel/COPYING
/usr/share/man/man1/ragel.1.gz
/usr/share/ragel.lm
/usr/share/vim
/usr/share/vim/vimfiles
/usr/share/vim/vimfiles/syntax
/usr/share/vim/vimfiles/syntax/ragel.vim

References

Summary

In this tutorial we learn how to install ragel on CentOS 8 using yum and dnf.