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

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

## 安装

```sh
sudo av install brew:strace
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install strace
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add strace
```

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

- Debian apt (92%):

```sh
sudo apt install strace
```

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

- dnf (92%):

```sh
sudo dnf install strace
```

  证据: Fedora Rawhide package metadata: strace 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#strace
```

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

- pacman (92%):

```sh
sudo pacman -S strace
```

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

- zypper (92%):

```sh
sudo zypper install strace
```

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

## 软件包事实

- **软件包键:** brew:strace
- **软件包管理器:** Homebrew
- **版本:** 7.1
- **来源摘要:** Diagnostic, instructional, and debugging tool for the Linux kernel
- **主页:** <https://strace.io/>
- **仓库:** <https://github.com/strace/strace>
- **最后更新:** 2026-06-15T19:22:18Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- strace (别名)
- strace-log-merge (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

strace is the standard Linux command-line tool for tracing system calls and signals. It is central to Unix debugging culture because it turns opaque process behavior into a readable syscall transcript.

### 项目历史

The strace manual history says the original program was written by Paul Kranenburg for SunOS and inspired by Sun's trace utility. Branko Lankester ported it to Linux and added Linux kernel support, and Rick Sladkey merged the SunOS and Linux lines in 1993 before adding SVR4, Solaris, and Irix work.

Maintenance later moved through Wichert Akkerman in 1996, Roland McGrath in 2002, and Dmitry Levin from 2009. The manual records major platform work across Linux architectures, a migration to Git, and the eventual removal of non-Linux code after the 4.6 release.

### 采用历史

strace is packaged across mainstream Unix-like package managers in the supplied source facts, including Homebrew, Debian, Fedora, Arch, Alpine, Nix, Ubuntu, and openSUSE.

Its adoption is tied less to a framework ecosystem and more to everyday operational debugging: when a binary cannot open a file, hangs on a socket, sees unexpected permissions, or makes surprising syscalls, strace is the small tool users install first.

### 使用方式

The man page describes tracing a new command, attaching to an existing process with -p, filtering syscall sets, tracing paths, dumping selected file descriptor I/O, collecting timing summaries, printing timestamps, decoding file descriptors, and injecting syscall faults.

Package users commonly install it as a rescue and diagnosis tool on Linux hosts, containers, CI images, and development machines.

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

strace is package-nerd significant because it explains package failures at the syscall layer: missing shared libraries, wrong config paths, permission problems, sandbox behavior, and network or filesystem assumptions become visible without rebuilding the program.

It is also a fixture of minimal debugging toolbelts. Even users who do not develop strace depend on distributions keeping its syscall tables current with the Linux kernel.

### 时间线

- 1991: Paul Kranenburg's SunOS strace lineage begins, according to the man page history.
- 1992: Branko Lankester ports strace to Linux.
- 1993: Rick Sladkey takes on the project and merges the SunOS and Linux versions.
- 1996: Wichert Akkerman becomes maintainer.
- 2002: Roland McGrath takes over maintenance.
- 2009: Dmitry Levin becomes active maintainer.
- 2012: strace 4.7 removes non-Linux code after the 4.6 release.

### Related projects

- The man page positions strace among Unix tracing tools such as Sun trace and SVR4 truss, and its Linux implementation depends on the kernel ptrace interface.
- Adjacent Linux diagnostic tools include ltrace, perf, ftrace tooling, and system-call-aware debuggers, but strace remains the small user-facing syscall tracer most package users reach for.

### 来源

- <https://github.com/strace/strace/blob/master/COPYING>
- <https://github.com/strace/strace/blob/master/NEWS>
- <https://man7.org/linux/man-pages/man1/strace.1.html>
- source_facts.package-manager


## 安全说明

process tracing tool.

- **Geiger 风险:** red / 中
- process tracing tool

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

- Debian apt - strace - 6.13+ds-1: normalized package name match | Debian stable package indexes: strace from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | System call tracer | https://strace.io
- Nix - strace: normalized package name match | nixpkgs package indexes: pkgs/by-name/st/strace/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - strace - 6.8-0ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: strace from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | System call tracer | https://strace.io
- apk - strace - 6.19-r1: normalized package name match | Alpine Linux edge package indexes: strace from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Diagnostic, debugging and instructional userspace tracer | https://strace.io
- apk - strace-dbg - 6.19-r1: normalized package name match | Alpine Linux edge package indexes: strace-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Diagnostic, debugging and instructional userspace tracer (debug symbols) | https://strace.io
- apk - strace-doc - 6.19-r1: normalized package name match | Alpine Linux edge package indexes: strace-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Diagnostic, debugging and instructional userspace tracer (documentation) | https://strace.io
- dnf - strace - 7.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: strace from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Tracks and displays system calls associated with a running process | https://strace.io
- pacman - strace - 7.0-1: normalized package name match | Arch Linux sync databases: strace from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A diagnostic, debugging and instructional userspace tracer | https://strace.io/
- zypper - strace - 7.1-2.3: normalized package name match | openSUSE Tumbleweed package metadata: strace from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A utility to trace the system calls of a program | http://strace.io/


## Combined YAML source

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