# 使用 Homebrew, apk, chocolatey, MacPorts, Nix, pacman, zypper, scoop, winget 安装 dmd

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

## 安装

```sh
sudo av install brew:dmd
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dmd
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dmd
```

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

### Linux

- apk (92%):

```sh
sudo apk add dmd
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#dmd
```

  证据: nixpkgs package indexes: pkgs/by-name/dm/dmd/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S dmd
```

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

- zypper (92%):

```sh
sudo zypper install dmd
```

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

### Windows

- Chocolatey (92%):

```sh
choco install dmd
```

  证据: Chocolatey community package catalog: dmd from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='10.804','zoxide'

- Scoop (92%):

```sh
scoop install main/dmd
```

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

- winget (92%):

```sh
winget install --id Dlang.DMD -e
```

  证据: Windows Package Manager source index: Dlang.DMD from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:dmd
- **软件包管理器:** Homebrew
- **版本:** 2.112.0
- **来源摘要:** Digital Mars D compiler
- **主页:** <https://dlang.org/>
- **仓库:** <https://github.com/dlang/dmd>
- **最后更新:** 2026-07-05T01:19:29Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dmd (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

DMD is the reference compiler for the D programming language, the practical systems and applications language started by Walter Bright as a better C++.

### 项目历史

The D Language Foundation describes D as a language begun by Walter Bright and grown steadily for more than 15 years. The official D blog gives the compiler-specific origin: Walter Bright began putting D together in 1999 using his existing Digital Mars C and C++ compiler tools and backend, concentrating on a new DMD frontend.

### 采用历史

DMD 0.00 was released in December 2001, Linux support arrived in DMD 0.63 in May 2003, and D 2.000 appeared in June 2007 according to the official change log. The modern project is maintained around the D Language Foundation, which supports D infrastructure, DConf, scholarships, and development resources.

### 使用方式

Package users install DMD for the command-line compiler, Phobos standard library, druntime, and companion tools such as rdmd, dub, dustmite, dumpobj, and ddemangle. The compiler reads dmd.conf settings, accepts DFLAGS, can compile, link, run, generate docs, emit coverage, and work with C toolchains.

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

DMD is package-nerd significant because it is both a compiler package and the historical reference implementation of D. Its packaging tells the story of D's unusual toolchain lineage: Digital Mars roots, POSIX use of system C toolchains, Windows object-format transitions, and eventual open-source redistribution under the Boost license.

### 时间线

- 1999: Walter Bright began putting D together.
- 2001-12: DMD 0.00 was released.
- 2003-05: DMD 0.63 brought Linux support.
- 2007-06: D 2.000 was released.
- 2026-01: D 2.112.0 appeared in the official change log.

### Related projects

- The DMD repository includes druntime and works alongside Phobos, dub, rdmd, and the broader D compiler ecosystem including LDC and GDC.

### 来源

- <https://dlang.org/foundation/about.html>
- <https://dlang.org/blog/2017/10/25/dmd-windows-and-c/>
- <https://dlang.org/changelog/index.html>
- <https://github.com/dlang/dmd#readme>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /etc/dmd.conf
- macOS: /usr/local/bin/dmd.conf
## 其他软件包管理器记录

- Nix - dmd: normalized package name match | nixpkgs package indexes: pkgs/by-name/dm/dmd/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - dmd - 2.112.1-r2: normalized package name match | Alpine Linux edge package indexes: dmd from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | D Programming Language reference compiler | https://github.com/dlang/dmd
- apk - dmd-doc - 2.112.1-r2: normalized package name match | Alpine Linux edge package indexes: dmd-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | D Programming Language reference compiler (documentation) | https://github.com/dlang/dmd
- pacman - dmd - 1:2.112.1-2: normalized package name match | Arch Linux sync databases: dmd from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The D programming language reference compiler | https://www.dlang.org
- zypper - dmd - 2.112.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: dmd from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | D Programming Language 2.0 | https://dlang.org/
- zypper - libphobos2-0_112 - 2.112.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: libphobos2-0_112 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Standard library for the D language | https://dlang.org/
- zypper - phobos-devel - 2.112.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: phobos-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for the D standard library | https://dlang.org/
- zypper - phobos-devel-static - 2.112.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: phobos-devel-static from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for the D standard library | https://dlang.org/
- MacPorts - dmd: normalized package name match | MacPorts ports tree: lang/dmd/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - dmd: normalized package name match | Chocolatey community package catalog: dmd from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='10.804','zoxide'
- Scoop - main/dmd: normalized package name match | Scoop official bucket manifest trees: bucket/dmd.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Dlang.DMD: normalized package name match | Windows Package Manager source index: Dlang.DMD from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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


## 来源

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