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

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

## 安装

```sh
sudo av install brew:cgdb
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cgdb
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cgdb
```

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

### Linux

- apk (92%):

```sh
sudo apk add cgdb
```

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

- Debian apt (92%):

```sh
sudo apt install cgdb
```

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

- dnf (92%):

```sh
sudo dnf install cgdb
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#cgdb
```

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

- pacman (92%):

```sh
sudo pacman -S cgdb
```

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

- zypper (92%):

```sh
sudo zypper install cgdb
```

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

## 软件包事实

- **软件包键:** brew:cgdb
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cgdb>
- **版本:** 0.8.0
- **来源摘要:** Curses-based interface to the GNU Debugger
- **主页:** <https://cgdb.github.io/>
- **仓库:** <https://github.com/cgdb/cgdb>
- **上游文档:** <https://cgdb.github.io/>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://cgdb.me/files/cgdb-0.8.0.tar.gz>
- **最后更新:** 2026-06-22T14:03:00-07:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- cgdb (cli)
- cgdb (别名)

## 依赖

- readline

## 构建依赖

- help2man
- texinfo

## macOS 提供的库

- ncurses

## 安装行为

- 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.8.0
- 管理器更新时间: 2026-06-22
- 本地数据: OK
- 上游仓库: https://cgdb.github.io/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

CGDB is a lightweight curses-based front end to GDB with a split source/GDB terminal interface modeled after vi.

### 项目历史

CGDB grew as a terminal debugger interface focused on keeping the familiar GDB prompt while adding a source window, syntax highlighting, breakpoints, and vi-like navigation. The manual identifies CGDB 0.8.0 as the GNU ncurses based front end to GDB.

### 采用历史

The project ships official source releases and is packaged broadly in Unix package managers. Its NEWS file shows long-running portability work across Unix variants, macOS, Cygwin, and newer GDB releases.

### 使用方式

Users launch cgdb as a GDB front end, pass commands through the GDB window, navigate source in CGDB mode, and configure behavior through cgdbrc files under CGDB_DIR or ~/.cgdb.

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

CGDB is a classic terminal-packaging example: small, curses-based, tied to readline/ncurses/GDB behavior, and useful for developers who want source-level debugging without a graphical IDE.

### 时间线

- 2003: NEWS records cgdb-0.4.0.
- 2006: cgdb-0.6.0 added a new manual and tab completion support.
- 2017: cgdb-0.7.0 added vertical/horizontal splitting, assembly support, and Rust syntax highlighting.
- 2022: cgdb-0.8.0 moved to GDB/MI and implemented a virtual terminal in the GDB window.

### Related projects

- CGDB is built around GNU GDB and includes gdbwire for communicating with GDB.

### 来源

- <https://api.github.com/repos/cgdb/cgdb>
- <https://github.com/cgdb/cgdb>
- <https://cgdb.github.io/>
- <https://cgdb.github.io/docs/cgdb.html>
- <https://cgdb.github.io/docs/cgdb.pdf>
- <https://formulae.brew.sh/api/formula/cgdb.json>
- <https://github.com/cgdb/cgdb/blob/master/NEWS>
- <https://github.com/cgdb/cgdb/blob/master/README.md>


## 安全说明

escape, surveillance, or offensive capability signal.

- **Geiger 风险:** red / 中
- escape, surveillance, or offensive capability signal


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

- Unix: $CGDB_DIR/cgdbrc, ~/.cgdb/cgdbrc
## 源数据库详情

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

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

- Debian apt - cgdb - 0.8.0-3: normalized package name match | Debian stable package indexes: cgdb from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | curses-based interface to the GNU Debugger (GDB) | https://cgdb.github.io/
- Nix - cgdb: normalized package name match | nixpkgs package indexes: pkgs/by-name/cg/cgdb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cgdb - 0.8.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: cgdb from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | curses-based interface to the GNU Debugger (GDB) | https://cgdb.github.io/
- apk - cgdb - 0.8.0-r4: normalized package name match | Alpine Linux edge package indexes: cgdb from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The Curses Debugger | https://cgdb.github.io/
- apk - cgdb-doc - 0.8.0-r4: normalized package name match | Alpine Linux edge package indexes: cgdb-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The Curses Debugger (documentation) | https://cgdb.github.io/
- dnf - cgdb - 0.8.0-17.fc45: normalized package name match | Fedora Rawhide package metadata: cgdb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | CGDB is a curses-based interface to the GNU Debugger (GDB) | https://cgdb.github.io/
- pacman - cgdb - 0.8.0-2: normalized package name match | Arch Linux sync databases: cgdb from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Curses-based interface to the GNU Debugger | http://cgdb.github.io/
- zypper - cgdb - 0.8.0-2.8: normalized package name match | openSUSE Tumbleweed package metadata: cgdb from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Curses debugger | https://cgdb.github.io/
- MacPorts - cgdb: normalized package name match | MacPorts ports tree: devel/cgdb/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.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [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.
- [texinfo](https://pkg.so/zh-hans/brew/texinfo/) - Build dependency declared by Homebrew.
- [help2man](https://pkg.so/zh-hans/brew/help2man/) - Build dependency declared by Homebrew.
- [arm-none-eabi-gdb](https://pkg.so/zh-hans/brew/arm-none-eabi-gdb/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools, gdb.
- [aarch64-elf-gdb](https://pkg.so/zh-hans/brew/aarch64-elf-gdb/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools, gdb.
- [ddd](https://pkg.so/zh-hans/brew/ddd/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools, gdb.
- [delve](https://pkg.so/zh-hans/brew/delve/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [mspdebug](https://pkg.so/zh-hans/brew/mspdebug/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [remake](https://pkg.so/zh-hans/brew/remake/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [oclgrind](https://pkg.so/zh-hans/brew/oclgrind/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [dwarfutils](https://pkg.so/zh-hans/brew/dwarfutils/) - Shares pkgdb curated category or tags: cli, debugging, developer-tools.
- [lnav](https://pkg.so/zh-hans/brew/lnav/) - Local package facts share a topical domain. Shared terms: based, cli, curses, curses-based, developer.
- [bitwise](https://pkg.so/zh-hans/brew/bitwise/) - Local package facts share a topical domain. Shared terms: based, cli, developer, developer-tools, readline.

## Combined YAML source

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


## 来源

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