# 使用 Homebrew, dnf, apt 安装 byteman

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

## 安装

```sh
sudo av install brew:byteman
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install byteman
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install byteman
```

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

- Debian apt (92%):

```sh
sudo apt install libbyteman-java
```

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

## 软件包事实

- **软件包键:** brew:byteman
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/byteman>
- **版本:** 4.0.27
- **来源摘要:** Java bytecode manipulation tool for testing, monitoring and tracing
- **主页:** <https://byteman.jboss.org/>
- **仓库:** <https://github.com/bytemanproject/byteman>
- **上游文档:** <https://byteman.jboss.org/>
- **许可证:** LGPL-2.1-or-later
- **源码归档:** <https://downloads.jboss.org/byteman/4.0.27/byteman-download-4.0.27-bin.zip>
- **最后更新:** 2026-06-22T14:02:56-07:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- bmcheck (cli)
- bminstall (cli)
- bmjava (cli)
- bmsubmit (cli)
- bytemancheck (cli)
- bmcheck (别名)
- bminstall (别名)
- bmjava (别名)
- bmsubmit (别名)
- bytemancheck (别名)

## 依赖

- openjdk

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 4.0.27
- 管理器更新时间: 2026-06-22
- 本地数据: OK
- 上游仓库: https://byteman.jboss.org/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

Byteman is a Java agent and command-line toolkit for injecting rules into running JVM programs. It is used for tracing, monitoring, testing, and fault injection without permanently changing application source code.

### 项目历史

The Byteman README describes the project as a tool for injecting side effects into Java programs to trace and test application behavior. Its distribution includes command scripts, an agent and rule engine, submit/install clients, sample scripts, and programmer documentation.

The official JBoss project site frames Byteman as a way to simplify Java tracing, monitoring, and testing. Its documentation history includes papers and talks by Andrew Dinn and other Red Hat/JBoss community members from 2009 onward, including fault-injection and runtime-behavior use cases.

### 采用历史

Byteman adoption is strongest in the Java middleware and testing world. The official docs page lists BMUnit tests or integrations involving WildFly, Narayana, Hibernate, Infinispan, HornetQ, JGroups, IronJacamar, Mule, and other JVM projects.

Packaging in Homebrew, Debian, Ubuntu, and Fedora reflects a niche but durable role: it is not a default Java tool, but it is valuable when tests need controlled failure, race, or runtime instrumentation scenarios.

### 使用方式

Users write Byteman rule scripts, check them with `bmcheck` or `bytemancheck`, run Java under the agent with `bmjava`, install the agent into a running JVM with `bminstall`, and submit rules with `bmsubmit`.

Typical package-manager usage is by developers or QA engineers who need to reproduce timing bugs, inject exceptions, trace JVM internals, or test recovery paths in Java services.

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

Byteman is notable because it packages JVM bytecode instrumentation as a Unix-style command tool. That makes heavy Java-agent machinery installable with `brew install byteman` or distro packages instead of manual download-and-unzip workflows.

For package nerds, it sits in the same practical family as debuggers, tracers, and test harnesses: rarely needed by everyone, but exactly the right sharp tool when ordinary unit tests cannot reach a runtime behavior.

### 时间线

- 2009: Official Byteman materials include a Jazoon presentation on bytecode manipulation for multi-threaded testing.
- 2011: Byteman appears in AOSD and JUDCon materials about tracing, debugging, and testing.
- 2013: Official docs list JUDCon talks and growing JVM-project usage.
- 2020s: Version 4.x documentation remains published through the JBoss Byteman site.

### Related projects

- BMUnit is the Byteman-oriented unit-testing integration referenced by the official tutorials and project list.
- ObjectWeb ASM is used by Byteman for bytecode manipulation, according to the README.
- WildFly, Narayana, Hibernate, Infinispan, HornetQ, and JGroups are listed by the official docs as projects using Byteman.

### 来源

- <https://byteman.jboss.org/docs.html>
- <https://github.com/bytemanproject/byteman/blob/master/README>


## 安全说明

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:** byteman
- **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 - libbyteman-java - 4.0.20-1: normalized package name match | Debian stable package indexes: libbyteman-java from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Java agent-based bytecode injection tool | https://byteman.jboss.org
- Ubuntu apt - libbyteman-java - 4.0.20-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libbyteman-java from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Java agent-based bytecode injection tool | https://byteman.jboss.org
- dnf - byteman - 4.0.26-4.fc45: normalized package name match | Fedora Rawhide package metadata: byteman from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Java agent-based bytecode injection tool | http://www.jboss.org/byteman
- dnf - byteman-bmunit - 4.0.26-4.fc45: normalized package name match | Fedora Rawhide package metadata: byteman-bmunit from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | TestNG and JUnit integration for Byteman. | http://www.jboss.org/byteman
- dnf - byteman-dtest - 4.0.26-4.fc45: normalized package name match | Fedora Rawhide package metadata: byteman-dtest from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Remote byteman instrumented testing. | http://www.jboss.org/byteman
- dnf - byteman-javadoc - 4.0.26-4.fc45: normalized package name match | Fedora Rawhide package metadata: byteman-javadoc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Javadoc for byteman | http://www.jboss.org/byteman
- dnf - byteman-rulecheck-maven-plugin - 4.0.26-4.fc45: normalized package name match | Fedora Rawhide package metadata: byteman-rulecheck-maven-plugin from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Maven plugin for checking Byteman rules. | http://www.jboss.org/byteman


## 相关链接

- [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.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [openjdk](https://pkg.so/zh-hans/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [moco](https://pkg.so/zh-hans/brew/moco/) - Shares pkgdb curated category or tags: cli, developer-tools, java, testing.
- [lcov](https://pkg.so/zh-hans/brew/lcov/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [bats-core](https://pkg.so/zh-hans/brew/bats-core/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [allure](https://pkg.so/zh-hans/brew/allure/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [kcov](https://pkg.so/zh-hans/brew/kcov/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [mockolo](https://pkg.so/zh-hans/brew/mockolo/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [mockery](https://pkg.so/zh-hans/brew/mockery/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [pytest](https://pkg.so/zh-hans/brew/pytest/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [sqlancer](https://pkg.so/zh-hans/brew/sqlancer/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, java, openjdk.
- [dex2jar](https://pkg.so/zh-hans/brew/dex2jar/) - Both packages touch the same language runtime or ecosystem. Shared terms: bytecode, cli, developer, developer-tools, java.

## Combined YAML source

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