# 使用 Homebrew, apt, MacPorts 安装 mingw-w64

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

## 安装

```sh
sudo av install brew:mingw-w64
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mingw-w64
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mingw-w64
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install mingw-w64
```

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

## 软件包事实

- **软件包键:** brew:mingw-w64
- **软件包管理器:** Homebrew
- **版本:** 14.0.0
- **来源摘要:** Minimalist GNU for Windows and GCC cross-compilers
- **主页:** <https://sourceforge.net/projects/mingw-w64/>
- **最后更新:** 2026-08-01T12:22:49Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- i686-w64-mingw32-addr2line (别名)
- i686-w64-mingw32-ar (别名)
- i686-w64-mingw32-as (别名)
- i686-w64-mingw32-c++ (别名)
- i686-w64-mingw32-c++filt (别名)
- i686-w64-mingw32-cpp (别名)
- i686-w64-mingw32-dlltool (别名)
- i686-w64-mingw32-dllwrap (别名)
- i686-w64-mingw32-elfedit (别名)
- i686-w64-mingw32-g++ (别名)
- i686-w64-mingw32-gcc (别名)
- i686-w64-mingw32-gcc-16.1.0 (别名)
- i686-w64-mingw32-gcc-ar (别名)
- i686-w64-mingw32-gcc-nm (别名)
- i686-w64-mingw32-gcc-ranlib (别名)
- i686-w64-mingw32-gcov (别名)
- i686-w64-mingw32-gcov-dump (别名)
- i686-w64-mingw32-gcov-tool (别名)
- i686-w64-mingw32-gfortran (别名)
- i686-w64-mingw32-gprof (别名)
- i686-w64-mingw32-ld (别名)
- i686-w64-mingw32-ld.bfd (别名)
- i686-w64-mingw32-lto-dump (别名)
- i686-w64-mingw32-nm (别名)
- i686-w64-mingw32-objcopy (别名)
- i686-w64-mingw32-objdump (别名)
- i686-w64-mingw32-ranlib (别名)
- i686-w64-mingw32-readelf (别名)
- i686-w64-mingw32-size (别名)
- i686-w64-mingw32-strings (别名)
- i686-w64-mingw32-strip (别名)
- i686-w64-mingw32-widl (别名)
- i686-w64-mingw32-windmc (别名)
- i686-w64-mingw32-windres (别名)
- x86_64-w64-mingw32-addr2line (别名)
- x86_64-w64-mingw32-ar (别名)
- x86_64-w64-mingw32-as (别名)
- x86_64-w64-mingw32-c++ (别名)
- x86_64-w64-mingw32-c++filt (别名)
- x86_64-w64-mingw32-cpp (别名)
- x86_64-w64-mingw32-dlltool (别名)
- x86_64-w64-mingw32-dllwrap (别名)
- x86_64-w64-mingw32-elfedit (别名)
- x86_64-w64-mingw32-g++ (别名)
- x86_64-w64-mingw32-gcc (别名)
- x86_64-w64-mingw32-gcc-16.1.0 (别名)
- x86_64-w64-mingw32-gcc-ar (别名)
- x86_64-w64-mingw32-gcc-nm (别名)
- x86_64-w64-mingw32-gcc-ranlib (别名)
- x86_64-w64-mingw32-gcov (别名)
- x86_64-w64-mingw32-gcov-dump (别名)
- x86_64-w64-mingw32-gcov-tool (别名)
- x86_64-w64-mingw32-gfortran (别名)
- x86_64-w64-mingw32-gprof (别名)
- x86_64-w64-mingw32-ld (别名)
- x86_64-w64-mingw32-ld.bfd (别名)
- x86_64-w64-mingw32-lto-dump (别名)
- x86_64-w64-mingw32-nm (别名)
- x86_64-w64-mingw32-objcopy (别名)
- x86_64-w64-mingw32-objdump (别名)
- x86_64-w64-mingw32-ranlib (别名)
- x86_64-w64-mingw32-readelf (别名)
- x86_64-w64-mingw32-size (别名)
- x86_64-w64-mingw32-strings (别名)
- x86_64-w64-mingw32-strip (别名)
- x86_64-w64-mingw32-widl (别名)
- x86_64-w64-mingw32-windmc (别名)
- x86_64-w64-mingw32-windres (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 14.0.0
## 项目历史与用法

MinGW-w64 is a continuation and expansion of the original MinGW effort to support GCC on Windows. The project history traces its start to work on 64-bit Windows support in 2005, while the official site describes the public fork from mingw.org in 2007 as a move to provide 64-bit support and additional Windows APIs.

### 项目历史

Technically, MinGW-w64 is not just a compiler binary. It is a collection of Windows header files, import libraries, runtime libraries, and tools that combine with GCC or LLVM to build native Windows applications and libraries. SourceForge describes it as a complete runtime environment for GCC targeting native 32-bit and 64-bit Windows binaries.

### 使用方式

Its ecosystem role is large for cross-compilation. Distributions such as MSYS2, standalone toolchain builds, and Unix package managers use MinGW-w64 to let developers produce Windows PE executables from Windows, macOS, and Linux environments. The Homebrew formula exposes that niche directly by installing cross-compiler tools with target prefixes such as `i686-w64-mingw32` and `x86_64-w64-mingw32`.

### 来源

- <https://sourceforge.net/p/mingw-w64/wiki2/History/>
- <https://sourceforge.net/projects/mingw-w64/>
- <https://www.mingw-w64.org/>
- <https://www.mingw-w64.org/downloads/>
- <https://www.mingw-w64.org/source/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

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

- Debian apt - mingw-w64 - 12.0.0-5: normalized package name match | Debian stable package indexes: mingw-w64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development environment targeting 32- and 64-bit Windows | http://mingw-w64.sf.net
- Debian apt - mingw-w64-common - 12.0.0-5: normalized package name match | Debian stable package indexes: mingw-w64-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Common files for Mingw-w64 | http://mingw-w64.sf.net
- Debian apt - mingw-w64-i686-dev - 12.0.0-5: normalized package name match | Debian stable package indexes: mingw-w64-i686-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for MinGW-w64 targeting Win32 | http://mingw-w64.sf.net
- Debian apt - mingw-w64-tools - 12.0.0-5: normalized package name match | Debian stable package indexes: mingw-w64-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development tools for 32- and 64-bit Windows | http://mingw-w64.sf.net
- Debian apt - mingw-w64-ucrt64-dev - 12.0.0-5: normalized package name match | Debian stable package indexes: mingw-w64-ucrt64-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for MinGW-w64 targeting Win64/UCRT | http://mingw-w64.sf.net
- Debian apt - mingw-w64-x86-64-dev - 12.0.0-5: normalized package name match | Debian stable package indexes: mingw-w64-x86-64-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for MinGW-w64 targeting Win64 | http://mingw-w64.sf.net
- Ubuntu apt - mingw-w64 - 11.0.1-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: mingw-w64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Development environment targeting 32- and 64-bit Windows | http://mingw-w64.sf.net
- Ubuntu apt - mingw-w64-common - 11.0.1-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: mingw-w64-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Common files for Mingw-w64 | http://mingw-w64.sf.net
- Ubuntu apt - mingw-w64-i686-dev - 11.0.1-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: mingw-w64-i686-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Development files for MinGW-w64 targeting Win32 | http://mingw-w64.sf.net
- Ubuntu apt - mingw-w64-tools - 11.0.1-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: mingw-w64-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Development tools for 32- and 64-bit Windows | http://mingw-w64.sf.net
- Ubuntu apt - mingw-w64-x86-64-dev - 11.0.1-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: mingw-w64-x86-64-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Development files for MinGW-w64 targeting Win64 | http://mingw-w64.sf.net
- MacPorts - mingw-w64: normalized package name match | MacPorts ports tree: cross/mingw-w64/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- MacPorts - i686-w64-mingw32-gcc: installed executable or alias match | MacPorts ports tree: cross/i686-w64-mingw32-gcc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/mingw-w64.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mingw-w64.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
