# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, scoop 安装 mold

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

## 安装

```sh
sudo av install brew:mold
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mold
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mold
```

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

### Linux

- apk (92%):

```sh
sudo apk add mold
```

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

- Debian apt (92%):

```sh
sudo apt install mold
```

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

- dnf (92%):

```sh
sudo dnf install mold
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#mold
```

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

- pacman (92%):

```sh
sudo pacman -S mold
```

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

- zypper (92%):

```sh
sudo zypper install mold
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/mold
```

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

## 软件包事实

- **软件包键:** brew:mold
- **软件包管理器:** Homebrew
- **版本:** 2.41.0
- **来源摘要:** Modern Linker
- **主页:** <https://github.com/rui314/mold>
- **仓库:** <https://github.com/rui314/mold>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ld.mold (别名)
- mold (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

mold is Rui Ueyama's high-speed linker, positioned as a drop-in replacement for existing Unix linkers. The project README says Ueyama had earlier developed LLVM lld and presents mold as several times faster than lld on large debuginfo-enabled binaries, targeting shorter debug-edit-rebuild cycles for C, C++, Rust, and other compiled-language projects.

### 项目历史

The 1.0 release was published as the first stable, production-ready release for Linux-based systems and described mold as a faster replacement for the default GNU linker for many user-land programs. That release also framed Ueyama's linker background as part of the project's credibility. Toolchain adoption followed quickly: GCC 12 gained -fuse-ld=mold support, putting mold alongside BFD, gold, and lld as an explicit compiler-driver linker choice.

### 采用历史

mold's technical niche is compatibility plus parallel performance. It competes directly with GNU ld, GNU gold, and LLVM lld, with FOSDEM material describing it as a fast portable ELF linker and arguing that it gained importance for GNU toolchain users because it supports GCC features that matter for large projects. The README documents support across many architectures and explains usage as either invoking mold directly or selecting it through compiler flags.

### 使用方式

The 2.0.0 release changed the license from AGPL to MIT after the AGPL/commercial dual-licensing approach failed to meet the project's goals. That license change expanded mold's packaging and adoption path, making it easier for distributions, build systems, and commercial users to choose it without copyleft-linking concerns.

### 来源

- <https://archive.fosdem.org/2024/schedule/event/fosdem-2024-2606-can-the-mold-linker-be-usr-bin-ld-/>
- <https://github.com/rui314/mold>
- <https://github.com/rui314/mold/releases/tag/v1.0.0>
- <https://github.com/rui314/mold/releases/tag/v2.0.0>
- <https://www.phoronix.com/news/GCC-12-Mold-Linker>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - mold - 2.37.1+dfsg-1: normalized package name match | Debian stable package indexes: mold from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Drop-in linker | https://github.com/rui314/mold
- Nix - mold: normalized package name match | nixpkgs package indexes: mold from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - mold - 2.30.0+dfsg-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: mold from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Drop-in linker | https://github.com/rui314/mold
- apk - mold - 2.39.1-r0: normalized package name match | Alpine Linux edge package indexes: mold from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | fast modern linker | https://github.com/rui314/mold
- apk - mold-doc - 2.39.1-r0: normalized package name match | Alpine Linux edge package indexes: mold-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | fast modern linker (documentation) | https://github.com/rui314/mold
- dnf - mold - 2.41.0-3.fc45: normalized package name match | Fedora Rawhide package metadata: mold from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A Modern Linker | https://github.com/rui314/mold
- pacman - mold - 2.41.0-1: normalized package name match | Arch Linux sync databases: mold from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A Modern Linker | https://github.com/rui314/mold
- zypper - mold - 2.41.0-1.4: normalized package name match | openSUSE Tumbleweed package metadata: mold from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Modern Linker (mold) | https://github.com/rui314/mold
- MacPorts - mold: normalized package name match | MacPorts ports tree: devel/mold/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/mold: normalized package name match | Scoop official bucket manifest trees: bucket/mold.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/mold.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mold.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
