# 使用 Homebrew, dnf, MacPorts, pacman, zypper, apk, apt, Nix, scoop 安装 gcc@15

查看 gcc@15 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gcc@15
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gcc15
```

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

### Linux

- dnf (92%):

```sh
sudo dnf install gcc15
```

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

- pacman (92%):

```sh
sudo pacman -S gcc15
```

  证据: Arch Linux sync databases: gcc15 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install cpp15
```

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

- apk (92%):

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

  证据: 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
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#gcc
```

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

### Windows

- Scoop (92%):

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

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

## 软件包事实

- **软件包键:** brew:gcc@15
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gcc@15>
- **版本:** 15.3.0
- **来源摘要:** GNU compiler collection
- **主页:** <https://gcc.gnu.org/>
- **仓库:** <https://gcc.gnu.org/git/gcc.git>
- **上游文档:** <https://gcc.gnu.org/faq.html>
- **许可证:** GPL-3.0-or-later WITH GCC-exception-3.1
- **源码归档:** <https://ftpmirror.gnu.org/gnu/gcc/gcc-15.3.0/gcc-15.3.0.tar.xz>
- **最后更新:** 2026-06-27T22:14:17Z
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- x86_64-pc-linux-gnu-c++-15 (cli)
- x86_64-pc-linux-gnu-g++-15 (cli)
- x86_64-pc-linux-gnu-gcc-15 (cli)
- x86_64-pc-linux-gnu-gcc-ar-15 (cli)
- x86_64-pc-linux-gnu-gcc-nm-15 (cli)
- x86_64-pc-linux-gnu-gcc-ranlib-15 (cli)
- x86_64-pc-linux-gnu-gfortran-15 (cli)
- x86_64-pc-linux-gnu-gm2-15 (cli)
- x86_64-pc-linux-gnu-c++-15 (别名)
- x86_64-pc-linux-gnu-g++-15 (别名)
- x86_64-pc-linux-gnu-gcc-15 (别名)
- x86_64-pc-linux-gnu-gcc-ar-15 (别名)
- x86_64-pc-linux-gnu-gcc-nm-15 (别名)
- x86_64-pc-linux-gnu-gcc-ranlib-15 (别名)
- x86_64-pc-linux-gnu-gfortran-15 (别名)
- x86_64-pc-linux-gnu-gm2-15 (别名)

## 依赖

- gmp
- isl
- libmpc
- mpfr
- zstd

## 构建依赖

- make

## 安装行为

- post-install 钩子: 已定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sequoia, sonoma, tahoe, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 15.3.0
- 管理器更新时间: 2026-06-27
- 本地数据: OK
- 上游仓库: https://gcc.gnu.org/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

GCC 15 is a versioned Homebrew package for the GCC 15 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++.

### 项目历史

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.

### 采用历史

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 15 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.

### 使用方式

As packaged here, GCC 15 exposes version-suffixed compiler tools such as gcc-15, g++-15, cpp-15, gcov-15, and gfortran-15, 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 15 change notes add package-visible changes such as incremental LTO support, multiple simultaneous diagnostic outputs, expanded OpenMP offload features, and an ISO COBOL compiler front end.

### 为什么软件包爱好者会关心

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.

### 时间线

- 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
- 2025: GCC 15.1 released on April 25
- 2026: GCC 15.3 released on June 12

### 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.

### 来源

- <https://gcc.gnu.org/>
- <https://gcc.gnu.org/gcc-15/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>


## 安全说明

没有找到 gcc@15 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

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

## 其他软件包管理器记录

- MacPorts - gcc15: package manager index match | MacPorts ports tree: lang/gcc15/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- dnf - gcc15 - 15.2.1-7.fc45: package manager index match | Fedora Rawhide package metadata: gcc15 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Various compatibility compilers (C, C++, Fortran, ...) | http://gcc.gnu.org
- dnf - gcc15-c++ - 15.2.1-7.fc45: package manager index match | Fedora Rawhide package metadata: gcc15-c++ from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | C++ support for GCC 15 compatibility compiler | http://gcc.gnu.org
- dnf - gcc15-gfortran - 15.2.1-7.fc45: package manager index match | Fedora Rawhide package metadata: gcc15-gfortran from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Fortran support for GCC 15 compatibility compiler | http://gcc.gnu.org
- pacman - gcc15 - 15.2.1+r934+gbcd3e3ff5aa7-1: package manager index match | Arch Linux sync databases: gcc15 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The GNU Compiler Collection - C and C++ frontends (15.x.x) | https://gcc.gnu.org
- zypper - cpp15 - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: cpp15 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GCC Preprocessor | https://gcc.gnu.org/
- zypper - gcc15 - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU C Compiler and Support Files | https://gcc.gnu.org/
- zypper - gcc15-32bit - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU C Compiler 32bit support | https://gcc.gnu.org/
- zypper - gcc15-PIE - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-PIE from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A default configuration to build all binaries in PIE mode | https://gcc.gnu.org/
- zypper - gcc15-ada - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-ada from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | GNU Ada Compiler Based on GCC (GNAT) | https://gcc.gnu.org/
- zypper - gcc15-ada-32bit - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-ada-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | GNU Ada Compiler Based on GCC (GNAT) | https://gcc.gnu.org/
- zypper - gcc15-c++ - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-c++ from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU C++ Compiler | https://gcc.gnu.org/
- zypper - gcc15-c++-32bit - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-c++-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The GNU C++ Compiler | https://gcc.gnu.org/
- zypper - gcc15-cobol - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-cobol from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | GNU GCC COBOL Compiler | https://gcc.gnu.org/
- zypper - gcc15-d - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-d from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | GNU D Compiler | https://gcc.gnu.org/
- zypper - gcc15-d-32bit - 15.2.1+git11263-1.1: package manager index match | openSUSE Tumbleweed package metadata: gcc15-d-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | GNU D Compiler | https://gcc.gnu.org/


## 相关链接

- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/zh-hans/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Archive and compression packages](https://www.automicvault.com/zh-hans/pkg/archive-compression-tools/) - Matched curated package taxonomy and local package facts.
- [zstd](https://www.automicvault.com/zh-hans/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [make](https://www.automicvault.com/zh-hans/pkg/brew/make/) - Build dependency declared by Homebrew.
- [gcc](https://www.automicvault.com/zh-hans/pkg/brew/gcc/) - Package name indicates the same formula family.
- [gcc@10](https://www.automicvault.com/zh-hans/pkg/brew/gcc-10/) - Package name indicates the same formula family.
- [gcc@11](https://www.automicvault.com/zh-hans/pkg/brew/gcc-11/) - Package name indicates the same formula family.
- [gcc@12](https://www.automicvault.com/zh-hans/pkg/brew/gcc-12/) - Package name indicates the same formula family.
- [gcc@13](https://www.automicvault.com/zh-hans/pkg/brew/gcc-13/) - Package name indicates the same formula family.
- [gcc@14](https://www.automicvault.com/zh-hans/pkg/brew/gcc-14/) - Package name indicates the same formula family.
- [gcc@9](https://www.automicvault.com/zh-hans/pkg/brew/gcc-9/) - Package name indicates the same formula family.

## Combined YAML source

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


## 来源

- 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
