# 使用 Homebrew, MacPorts 安装 dwarf

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

## 安装

```sh
sudo av install brew:dwarf
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dwarf
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dwarf
```

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

## 软件包事实

- **软件包键:** brew:dwarf
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/dwarf>
- **版本:** 0.4.0
- **来源摘要:** Object file manipulation tool
- **主页:** <https://github.com/elboza/dwarf-ng/>
- **仓库:** <https://github.com/elboza/dwarf-ng>
- **上游文档:** <https://github.com/elboza/dwarf-ng/>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://github.com/elboza/dwarf-ng/archive/refs/tags/dwarf-0.4.0.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- dwarf (cli)
- dwarf (别名)

## 依赖

- flex
- readline

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.4.0
- 本地数据: OK
- 上游仓库: https://github.com/elboza/dwarf-ng
- 检测到的最新版本: dwarf-0.4.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

dwarf is the command shipped by dwarf-ng, a small object-file manipulation tool and hex editor in the spirit of gdb. Despite the name, it is not the libdwarf/dwarfdump DWARF-debug-info package; it focuses on reading and editing Raw, ELF, PE, and Mach-O files.

### 项目历史

The dwarf-ng man page is dated 2007-2011 and credits Fernando Iazeolla as founder and core developer. The README's usage banner identifies dwarf-ng 0.4.0 with copyright years 2007, 2013, and 2017.

The project later moved from an older code.google.com homepage reference to GitHub; the current GitHub repository was created in May 2013. The README describes the tool as a command-line hex editor and object-file manipulator with an interactive shell and a command language.

### 采用历史

Public adoption appears small. The input metadata lists Homebrew and MacPorts packages, and GitHub metadata shows a niche repository rather than a broad ecosystem project. That makes the history useful mainly for distinguishing the package from DWARF debug-info tooling with similar names.

### 使用方式

Users run dwarf against object files to inspect file information, print bytes and structured headers, edit blocks, create or remove headers, inject data, and work interactively. The man page documents support for ELF, PE, Mach-O, and Mach-O fat binaries.

The tool reads /etc/dwarfrc and ~/.dwarfrc for settings such as working on a temporary copy, verbosity, temporary paths, and colors.

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

The package is significant mostly as a naming trap and a small binary-analysis artifact. In package indexes, brew:dwarf can be mistaken for DWARF debugging utilities, but its actual role is closer to a scriptable hex/object editor adjacent to readelf, objdump, otool, gdb, ht, elfsh, and elfdump.

### 时间线

- 2007: The man page copyright range begins, marking the early dwarf-ng era.
- 2011: The hosted man page is generated from the dwarf-ng manual.
- 2013: The official GitHub repository is created.
- 2017: The README usage banner lists dwarf-ng 0.4.0 with 2017 in the copyright range.

### Related projects

- The man page lists readelf, objdump, ht, otool, gdb, elfsh, and elfdump as related tools.
- ELF, PE, Mach-O, and raw binary files are the file formats documented by the README and man page.

### 来源

- <https://github.com/elboza/dwarf-ng#readme>
- <https://www.autistici.org/0xFE/src/dwarf-ng/xdwarf.man.html>
- <https://api.github.com/repos/elboza/dwarf-ng>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

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

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

- MacPorts - dwarf: normalized package name match | MacPorts ports tree: sysutils/dwarf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [flex](https://pkg.so/zh-hans/brew/flex/) - Runtime dependency declared by Homebrew.
- [binsider](https://pkg.so/zh-hans/brew/binsider/) - Shares pkgdb curated category or tags: binary-analysis, cli, developer-tools, elf.
- [swift-section](https://pkg.so/zh-hans/brew/swift-section/) - Shares pkgdb curated category or tags: binary-analysis, cli, developer-tools, mach-o.
- [abi-dumper](https://pkg.so/zh-hans/brew/abi-dumper/) - Shares pkgdb curated category or tags: binary-analysis, cli, developer-tools, elf.
- [libabigail](https://pkg.so/zh-hans/brew/libabigail/) - Shares pkgdb curated category or tags: binary-analysis, cli, developer-tools, elf.
- [objconv](https://pkg.so/zh-hans/brew/objconv/) - Shares pkgdb curated category or tags: cli, developer-tools, object-files.
- [readpe](https://pkg.so/zh-hans/brew/readpe/) - Shares pkgdb curated category or tags: binary-analysis, cli, developer-tools.
- [bingrep](https://pkg.so/zh-hans/brew/bingrep/) - Shares pkgdb curated category or tags: binary-analysis, cli, developer-tools.
- [elfx86exts](https://pkg.so/zh-hans/brew/elfx86exts/) - Shares pkgdb curated category or tags: binary-analysis, cli, developer-tools, elf, mach-o.

## Combined YAML source

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


## 来源

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