Install re2c on RHEL8 / CentOS 8 / AlmaLinux

You can get the following error during steps which are dependent on re2c, for example while executing the make command.

/bin/sh: re2c: command not found

If you get an error like the one above, read here how to install it on RHEL / CentOS 8 or AlmaLinux.

1. Find and download the .rpm for re2c

First, download the RPM for re2c, you can use CURL for this.

curl https://rpmfind.net/linux/centos/8-stream/PowerTools/x86_64/os/Packages/re2c-0.14.3-2.el8.x86_64.rpm --output re2c-0.14.3-2.el8.x86_64.rpm

Note: as of writing the latest released version is 0.14.3.2, of which the link is above. However you could potentially find a newer version yourself on this page (look in the “download” column for your distribution).

2. Install RPM

To install the downloaded RPM, simply execute the following command (make sure the filename matches the file you downloaded in the previous step):

rpm -Uvh re2c-0.14.3-2.el8.x86_64.rpm

If everything went OK you should see the following output:

warning: re2c-0.14.3-2.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:re2c-0.14.3-2.el8                ################################# [100%]

By Leendert de Borst

Freelance software architect with 10+ years of experience. Expert in translating complex technical problems into creative & simple solutions.

Leave a comment

Your email address will not be published. Required fields are marked *