# Install gnucobol with Homebrew, apk, apt, dnf, MacPorts, Nix, zypper

COBOL85-202x compiler supporting lots of dialect specific extensions. Version 3.2 via Homebrew; verified 2026-06-28.

## Install

```sh
sudo av install brew:gnucobol
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gnucobol
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gnucobol
```

  Evidence: MacPorts ports tree: lang/gnucobol/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add gnucobol
```

  Evidence: Alpine Linux edge package indexes: gnucobol from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install gnucobol
```

  Evidence: Debian stable package indexes: gnucobol from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install gnucobol
```

  Evidence: Fedora Rawhide package metadata: gnucobol from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#gnucobol
```

  Evidence: nixpkgs package indexes: pkgs/by-name/gn/gnucobol/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install gnucobol
```

  Evidence: openSUSE Tumbleweed package metadata: gnucobol from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:gnucobol
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gnucobol>
- **Version:** 3.2
- **Source summary:** COBOL85-202x compiler supporting lots of dialect specific extensions
- **Homepage:** <https://gnucobol.sourceforge.io/>
- **Upstream docs:** <https://gnucobol.sourceforge.io/doc/gnucobol.html>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://ftpmirror.gnu.org/gnu/gnucobol/gnucobol-3.2.tar.xz>
- **Last updated:** 2026-06-28T03:24:27Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cob-config (cli)
- cobc (cli)
- cobcrun (cli)
- cob-config (alias)
- cobc (alias)
- cobcrun (alias)

## Dependencies

- berkeley-db
- gmp
- json-c

## Build dependencies

- pkgconf

## Uses from macOS

- libxml2
- ncurses

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.2
- Package-manager updated: 2026-06-28
- Local data: ok
- Upstream repository: https://gnucobol.sourceforge.io/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

GnuCOBOL is a free COBOL compiler that translates COBOL source to C and then uses the configured C compiler to produce native code. Its importance comes from keeping COBOL available in the GNU toolchain and package-manager world while supporting many historical dialects and newer COBOL standards features.

### Project history

The project began as OpenCOBOL around 2002. The FAQ credits Keisuke Nishida as the initial developer, influenced by TinyCOBOL, records the first public 0.9.0 release on January 25, 2002, and notes Roger While taking the lead developer role in 2004. OpenCOBOL 1.0 followed in 2007, and the 1.1 line became the basis for the GNU-era package.

OpenCOBOL was accepted as an official GNU project on September 27, 2013 and first rebranded as GNU Cobol. The spelling GnuCOBOL became preferred in September 2014, Simon Sobisch became project lead in 2014, and the FAQ records Free Software Foundation copyright assignment becoming legally binding in June 2015 for the source tree dating back to the original public release.

Later releases expanded dialect handling, diagnostics, runtime behavior, source-level debugging, report writer support, JSON and XML generation, and compatibility with older and vendor-specific COBOL styles. The project page describes GnuCOBOL 3.2 as producing native executables and supporting Linux, BSD, proprietary Unix systems, macOS, Windows, and other platforms.

### Adoption history

GnuCOBOL serves a particular adoption niche: organizations and individual programmers with COBOL code can compile and test it with a free compiler, often on commodity Unix-like systems. The FAQ says OpenCOBOL and GnuCOBOL have been used in production environments, while also warning that each production use needs risk analysis.

Its package-manager significance is amplified by COBOL's long commercial history. GnuCOBOL lets package repositories ship a working COBOL compiler without tying users to proprietary mainframe or vendor compiler ecosystems, and its LGPL runtime allows commercial use of generated programs under the stated license terms.

### How it is used

Practitioners use cobc to compile COBOL files into modules, object files, C output, or executable programs. Typical workflows include building legacy COBOL with dialect options such as -std, compiling free-format or fixed-format source, integrating C libraries, running modules with cobcrun, and using compiler listings or warning modes during modernization.

The package is also used for teaching, migration experiments, CI checks for COBOL code, and prototyping around vendor dialects. Because GnuCOBOL emits C, users can lean on the host compiler, linker, debugger, and platform libraries rather than requiring a dedicated COBOL runtime environment for every step.

### Why package nerds care

GnuCOBOL is the rare package that makes a historically enterprise language feel like a normal open-source compiler dependency. For package maintainers it is a bridge between COBOL archives and modern Unix build systems; for language-runtime collectors it is a compact way to keep COBOL executable on laptops, CI runners, and free-software distributions.

### Timeline

- 2002: OpenCOBOL 0.9.0 was publicly released.
- 2004: Roger While took the lead developer role.
- 2013: OpenCOBOL was accepted as an official GNU project and rebranded as GNU Cobol.
- 2014: GnuCOBOL became the preferred spelling and Simon Sobisch became project lead.
- 2015: FSF copyright assignment for the source tree became legally binding.
- 2023: GnuCOBOL 3.2 was released.

### Related projects

- Related projects include TinyCOBOL, the COBOL 85/2002/2014 standards, GCC or another configured C compiler, libcob, GDB, OpenCOBOLIDE, and vendor dialects such as IBM, Micro Focus, ACUCOBOL-GT, RM/COBOL, and GCOS.

### Sources

- <https://ftp.gnu.org/gnu/gnucobol/>
- <https://gnucobol.sourceforge.io/>
- <https://gnucobol.sourceforge.io/doc/gnucobol.html>
- <https://gnucobol.sourceforge.io/faq/>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gnucobol
- **Version Scheme:** 0
- **Revision:** 1
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - gnucobol - 5: normalized package name match | Debian stable package indexes: gnucobol from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | compiler package for default GnuCOBOL
- Nix - gnucobol: normalized package name match | nixpkgs package indexes: pkgs/by-name/gn/gnucobol/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gnucobol - 5: normalized package name match | Ubuntu 24.04 LTS package indexes: gnucobol from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | compiler package for default GnuCOBOL
- apk - gnucobol - 3.2-r0: normalized package name match | Alpine Linux edge package indexes: gnucobol from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | GnuCOBOL compiler | https://www.gnu.org/software/gnucobol/
- apk - gnucobol-doc - 3.2-r0: normalized package name match | Alpine Linux edge package indexes: gnucobol-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | GnuCOBOL compiler (documentation) | https://www.gnu.org/software/gnucobol/
- apk - gnucobol-lang - 3.2-r0: normalized package name match | Alpine Linux edge package indexes: gnucobol-lang from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Languages for package gnucobol | https://www.gnu.org/software/gnucobol/
- apk - libcob4 - 3.2-r0: normalized package name match | Alpine Linux edge package indexes: libcob4 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | GnuCOBOL runtime library | https://www.gnu.org/software/gnucobol/
- dnf - gnucobol - 3.2-9.fc44: normalized package name match | Fedora Rawhide package metadata: gnucobol from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | COBOL compiler | https://www.gnu.org/software/gnucobol/
- dnf - gnucobol-esql - 3.2-9.fc44: normalized package name match | Fedora Rawhide package metadata: gnucobol-esql from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | ESQL for GnuCOBOL | https://www.gnu.org/software/gnucobol/
- dnf - libcob - 3.2-9.fc44: normalized package name match | Fedora Rawhide package metadata: libcob from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | GnuCOBOL runtime library | https://www.gnu.org/software/gnucobol/
- zypper - gnucobol - 3.2-3.3: normalized package name match | openSUSE Tumbleweed package metadata: gnucobol from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A COBOL compiler | https://www.gnu.org/software/gnucobol/
- zypper - gnucobol-esql - 3.2-3.3: normalized package name match | openSUSE Tumbleweed package metadata: gnucobol-esql from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | ESQL for GnuCOBOL | https://www.gnu.org/software/gnucobol/
- zypper - gnucobol-esql-devel - 3.2-3.3: normalized package name match | openSUSE Tumbleweed package metadata: gnucobol-esql-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Devel package for ESQL | https://www.gnu.org/software/gnucobol/
- zypper - libcob4 - 3.2-3.3: normalized package name match | openSUSE Tumbleweed package metadata: libcob4 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | GnuCOBOL shared library | https://www.gnu.org/software/gnucobol/
- MacPorts - gnucobol: normalized package name match | MacPorts ports tree: lang/gnucobol/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [berkeley-db](https://www.automicvault.com/pkg/brew/berkeley-db/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [futhark](https://www.automicvault.com/pkg/brew/futhark/) - Shares av.db curated category or tags: cli, compiler, compilers, language-runtime, programming-language.
- [gcc](https://www.automicvault.com/pkg/brew/gcc/) - Shares av.db curated category or tags: cli, compiler, compilers, gnu, language-runtime.
- [mlkit](https://www.automicvault.com/pkg/brew/mlkit/) - Shares av.db curated category or tags: cli, compiler, compilers, language-runtime, programming-language.
- [dmd](https://www.automicvault.com/pkg/brew/dmd/) - Shares av.db curated category or tags: cli, compiler, language-runtime, native-code, programming-language.
- [fpc](https://www.automicvault.com/pkg/brew/fpc/) - Shares av.db curated category or tags: cli, compiler, compilers, language-runtime.
- [ispc](https://www.automicvault.com/pkg/brew/ispc/) - Shares av.db curated category or tags: cli, compiler, compilers, language-runtime.
- [kawa](https://www.automicvault.com/pkg/brew/kawa/) - Shares av.db curated category or tags: cli, compiler, gnu, language-runtime, programming-language.
- [algol68g](https://www.automicvault.com/pkg/brew/algol68g/) - Shares av.db curated category or tags: cli, compiler, language-runtime, programming-language.

## Combined YAML source

View the package source record on GitHub. [combined/gnucobol.yml](https://github.com/automic-vault/db/blob/main/combined/gnucobol.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
