Install COBOL on Rocky Linux

Update dnf

On Rocky Linux the compiler comes from the base repositories. Refresh the package index first:

sudo dnf check-update

Install gnucobol

Install gnucobol with dnf:

sudo dnf install gnucobol

cobc --version

Check the compiler after the install:

cobc --version

cobc (GnuCOBOL) 3.2.0

The cobc --version output on this page was produced by GnuCOBOL 3.2.0 on Alpine Linux 3.24.3 (x86_64) in a Docker container. The install steps were not run: they need Rocky Linux and root.

Article author: Arthur Isaev

Banner image