Install COBOL on FreeBSD

Update pkg

On FreeBSD the compiler comes from the package collection. Refresh the package index first:

sudo pkg update

Install gnucobol

Install gnucobol with pkg:

sudo pkg 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 FreeBSD and root.

Article author: Arthur Isaev