Install COBOL on macOS

Install Homebrew

GnuCOBOL installs through Homebrew. If you do not have Homebrew yet, install it from its official site, then verify it is on your PATH:

brew --version

Install gnucobol

Install the compiler with one command:

brew 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 macOS and Homebrew.

Article author: Arthur Isaev