# Install gcc@9 with Homebrew, apt, MacPorts, apk, dnf, Nix, pacman, scoop, zypper

GNU compiler collection. Version 9.5.0 via Homebrew; verified 2026-07-03.

## Install

```sh
sudo av install brew:gcc@9
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gcc@9
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gcc9
```

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

### Linux

- Ubuntu apt (92%):

```sh
sudo apt install cpp-9
```

  Evidence: Ubuntu 24.04 LTS package indexes: cpp-9 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

- apk (92%):

```sh
sudo apk add g++
```

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

- Debian apt (92%):

```sh
sudo apt install gcc
```

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

- dnf (92%):

```sh
sudo dnf install cpp
```

  Evidence: Fedora Rawhide package metadata: cpp 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#gcc
```

  Evidence: nixpkgs package indexes: gcc from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S gcc
```

  Evidence: Arch Linux sync databases: gcc from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- zypper (92%):

```sh
sudo zypper install cpp
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/gcc
```

  Evidence: Scoop official bucket manifest trees: bucket/gcc.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:gcc@9
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gcc@9>
- **Version:** 9.5.0
- **Source summary:** GNU compiler collection
- **Homepage:** <https://gcc.gnu.org/>
- **Repository:** <https://gcc.gnu.org/git/gcc.git>
- **Upstream docs:** <https://gcc.gnu.org/install>
- **License:** GPL-3.0-or-later WITH GCC-exception-3.1
- **Source archive:** <https://ftpmirror.gnu.org/gnu/gcc/gcc-9.5.0/gcc-9.5.0.tar.xz>
- **Last updated:** 2026-07-03T16:36:49-04:00
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- c++-9 (cli)
- cpp-9 (cli)
- g++-9 (cli)
- gcc-9 (cli)
- gcc-ar-9 (cli)
- gcc-nm-9 (cli)
- gcc-ranlib-9 (cli)
- gcov-9 (cli)
- gcov-dump-9 (cli)
- gcov-tool-9 (cli)
- gfortran-9 (cli)
- x86_64-apple-darwin20-c++-9 (cli)
- x86_64-apple-darwin20-g++-9 (cli)
- x86_64-apple-darwin20-gcc-9 (cli)
- x86_64-apple-darwin20-gcc-9.5.0 (cli)
- x86_64-apple-darwin20-gcc-ar-9 (cli)
- x86_64-apple-darwin20-gcc-nm-9 (cli)
- x86_64-apple-darwin20-gcc-ranlib-9 (cli)
- x86_64-apple-darwin20-gfortran-9 (cli)
- c++-9 (alias)
- cpp-9 (alias)
- g++-9 (alias)
- gcc-9 (alias)
- gcc-ar-9 (alias)
- gcc-nm-9 (alias)
- gcc-ranlib-9 (alias)
- gcov-9 (alias)
- gcov-dump-9 (alias)
- gcov-tool-9 (alias)
- gfortran-9 (alias)
- x86_64-apple-darwin20-c++-9 (alias)
- x86_64-apple-darwin20-g++-9 (alias)
- x86_64-apple-darwin20-gcc-9 (alias)
- x86_64-apple-darwin20-gcc-9.5.0 (alias)
- x86_64-apple-darwin20-gcc-ar-9 (alias)
- x86_64-apple-darwin20-gcc-nm-9 (alias)
- x86_64-apple-darwin20-gcc-ranlib-9 (alias)
- x86_64-apple-darwin20-gfortran-9 (alias)

## Dependencies

- gmp
- isl
- libmpc
- mpfr

## Install behavior

- Post-install hook: defined
- Bottle: available on arm64_linux, big_sur, catalina, monterey, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 9.5.0
- Package-manager updated: 2026-07-03
- Local data: ok
- Upstream repository: https://gcc.gnu.org/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

GCC 9 is a versioned Homebrew package for the GCC 9 release series of the GNU Compiler Collection. It provides the GNU Project compiler suite under major-version-suffixed command names so it can coexist with other GCC lines and platform compilers.

GCC itself is one of the central free-software toolchains: the official project describes it as the GNU Compiler Collection, with front ends for C, C++, Objective-C, Fortran, Ada, Go, D, Modula-2, COBOL, Rust, and Algol 68, plus runtime libraries such as libstdc++.

### Project history

GCC began as the GNU C Compiler. The GCC project history records the first beta release on March 22, 1987, by Richard Stallman, originally for the GNU operating system and initially centered on C.

During the 1990s, GCC grew beyond C into a multi-language compiler suite. The official GCC 2.95 page notes that the name changed from GNU C Compiler to GNU Compiler Collection because the compiler supported several languages beyond C.

A major governance and development milestone was the EGCS fork in 1997, created to merge active GCC development work from several communities. GCC and EGCS were reunified in April 1999, and GCC 2.95 was the first release after that reunification.

### Adoption history

GCC became widely adopted because it was both the GNU system compiler and an openly developed, portable optimizing compiler. The current mission statement emphasizes support for many platforms, many architectures, open mailing lists, and participation by individuals and companies.

The GCC 9 package represents package-manager demand for a stable major compiler series rather than only the newest compiler. Official release branches and tags make these major lines easy for distributors and users to pin, audit, and rebuild.

### How it is used

As packaged here, GCC 9 exposes version-suffixed compiler tools such as gcc-9, g++-9, cpp-9, gcov-9, and gfortran-9, depending on the platform package. This lets users select the intended compiler line explicitly in build scripts.

Official GCC installation documentation covers downloading sources, configuring, building, testing, and final installation, while the online manuals document compiler invocation, language front ends, runtime libraries, and toolchain options.

The GCC 9 change notes include package-relevant diagnostic and tooling improvements such as JSON diagnostic output, shell completion support, live-patching options, and source-location display improvements.

### Why package nerds care

Versioned GCC packages matter because compilers are infrastructure, not leaf applications. A build may need a particular major GCC for language support, libstdc++ behavior, Fortran ABI expectations, sanitizer behavior, or target support, while another project on the same machine needs a different line.

The official Git repository page documents release branches and release tags, which is exactly the provenance package maintainers need when mapping formula names such as gcc@12 or gcc@15 to upstream source history.

### Timeline

- 1987: First GCC beta release as the GNU C Compiler
- 1997: EGCS fork announced as an experimental GCC development project
- 1999: GCC and EGCS reunified; GCC 2.95 released after reunification
- 2019: GCC 9.1 released on May 3
- 2022: GCC 9.5 released on May 27

### Related projects

- EGCS is the historically important GCC fork that was later reunified with GCC.
- Related components within the GCC distribution include libstdc++, GFortran, GOMP/libgomp, GCC Go, GDC, GM2, and newer front ends documented on the official GCC site.
- GCC is part of the wider GNU toolchain ecosystem and is commonly used with source-control, build, and generated-file tooling such as Git, Autoconf, Bison, Automake, Xgettext, and Gperf, all mentioned in GCC source-tree documentation.

### Sources

- <https://gcc.gnu.org/>
- <https://gcc.gnu.org/gcc-9/changes.html>
- <https://gcc.gnu.org/gccmission.html>
- <https://gcc.gnu.org/git.html>
- <https://gcc.gnu.org/releases.html>
- <https://gcc.gnu.org/wiki/History>


## Security Notes

No matching local secret-handling manifest was found for gcc@9. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gcc@9
- **Version Scheme:** 0
- **Revision:** 0
- **Requirements:** arch, maximum_macos
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** yes
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Ubuntu apt - cpp-9 - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: cpp-9 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU C preprocessor | http://gcc.gnu.org/
- Ubuntu apt - cpp-9-doc - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: cpp-9-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Documentation for the GNU C preprocessor (cpp) | http://gcc.gnu.org/
- Ubuntu apt - g++-9 - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: g++-9 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU C++ compiler | http://gcc.gnu.org/
- Ubuntu apt - g++-9-multilib - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: g++-9-multilib from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU C++ compiler (multilib support) | http://gcc.gnu.org/
- Ubuntu apt - gcc-9 - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU C compiler | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-base - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-base from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GCC, the GNU Compiler Collection (base package) | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-doc - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Documentation for the GNU compilers (gcc, gobjc, g++) | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-hppa64-linux-gnu - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-hppa64-linux-gnu from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU C compiler (cross compiler for hppa64) | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-locales - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-locales from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GCC, the GNU compiler collection (native language support files) | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-multilib - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-multilib from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU C compiler (multilib support) | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-offload-nvptx - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-offload-nvptx from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GCC offloading compiler to NVPTX | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-plugin-dev - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-plugin-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Files for GNU GCC plugin development. | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-source - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-source from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Source of the GNU Compiler Collection | http://gcc.gnu.org/
- Ubuntu apt - gcc-9-test-results - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gcc-9-test-results from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Test results for the GCC test suite | http://gcc.gnu.org/
- Ubuntu apt - gccbrig-9 - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gccbrig-9 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU BRIG (HSA IL) frontend | http://gcc.gnu.org/
- Ubuntu apt - gccgo-9 - 9.5.0-6ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: gccgo-9 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU Go compiler | http://gcc.gnu.org/


## Related links

- [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.
- [gcc](https://www.automicvault.com/pkg/brew/gcc/) - Package name indicates the same formula family.
- [gcc@10](https://www.automicvault.com/pkg/brew/gcc-10/) - Package name indicates the same formula family.
- [gcc@11](https://www.automicvault.com/pkg/brew/gcc-11/) - Package name indicates the same formula family.
- [gcc@12](https://www.automicvault.com/pkg/brew/gcc-12/) - Package name indicates the same formula family.
- [gcc@13](https://www.automicvault.com/pkg/brew/gcc-13/) - Package name indicates the same formula family.
- [gcc@14](https://www.automicvault.com/pkg/brew/gcc-14/) - Package name indicates the same formula family.
- [gcc@15](https://www.automicvault.com/pkg/brew/gcc-15/) - Package name indicates the same formula family.

## Combined YAML source

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


## Sources

- Nucleus package database
- package-page enrichment
- curated package history
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
