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

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

## 安装

```sh
sudo av install brew:bubblewrap
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install bubblewrap
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add bubblewrap
```

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

- Debian apt (92%):

```sh
sudo apt install bubblewrap
```

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

- dnf (92%):

```sh
sudo dnf install bubblewrap
```

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

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

- pacman (92%):

```sh
sudo pacman -S bubblewrap
```

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

- zypper (92%):

```sh
sudo zypper install bubblewrap
```

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

## 软件包事实

- **软件包键:** brew:bubblewrap
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/bubblewrap>
- **版本:** 0.11.2
- **来源摘要:** Unprivileged sandboxing tool for Linux
- **主页:** <https://github.com/containers/bubblewrap>
- **仓库:** <https://github.com/containers/bubblewrap>
- **许可证:** LGPL-2.0-or-later
- **源码归档:** <https://github.com/containers/bubblewrap/releases/download/v0.11.2/bubblewrap-0.11.2.tar.xz>
- **最后更新:** 2026-06-11T17:22:39Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- bwrap (cli)
- bwrap (别名)

## 依赖

- libcap

## 构建依赖

- docbook-xsl
- libxslt
- meson
- ninja
- pkgconf

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.11.2
- 管理器更新时间: 2026-06-11
- 本地数据: OK
- 上游仓库: https://github.com/containers/bubblewrap
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

bubblewrap is a low-level Linux sandboxing tool that constructs restricted process environments with namespaces, bind mounts, seccomp, and related kernel features. It is best known as the small, auditable sandbox primitive used by Flatpak and similar desktop/container tools.

### 项目历史

The bubblewrap README positions it against system-administrator container runtimes such as Docker and systemd-nspawn: those tools are not suitable to hand directly to unprivileged users, while bubblewrap is designed around unprivileged sandbox construction.

The original code predates modern unprivileged user namespaces and inherits from xdg-app helper code, which in turn derives from linux-user-chroot. Older bubblewrap also supported a setuid mode for systems without unprivileged user namespaces, but the README notes that setuid support has been removed.

The public GitHub repository was created in February 2016. The repository description identifies bubblewrap as a low-level unprivileged sandboxing tool used by Flatpak and similar projects, with topics for Linux containers and user namespaces.

### 采用历史

bubblewrap spread because Flatpak and related desktop sandboxing systems needed a small shared primitive instead of each project carrying its own privileged helper. The README lists Flatpak, rpm-ostree unprivileged, and bwrap-oci as users or intended users.

The input package metadata shows broad Linux distribution packaging through Alpine, Debian, Fedora/dnf, Nix, Arch/pacman, Ubuntu, and openSUSE/zypper, plus Homebrew. That breadth reflects its role as plumbing for sandbox frameworks rather than as an end-user application.

Security-sensitive adoption is cautious: bubblewrap constructs a sandbox, but the actual security boundary depends on the arguments supplied by the caller. This makes it attractive for larger frameworks that own policy and want a narrow mechanism.

### 使用方式

bwrap creates a new mount namespace whose root is an empty tmpfs, then command-line options bind selected host paths, create proc/dev views, unshare namespaces, apply seccomp filters, and run a command inside the resulting environment.

Typical direct use is scripting a constrained shell or process; typical indirect use is through Flatpak or another framework that assembles a policy-specific bwrap command. The project has no ordinary per-user config file or credentials store.

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

bubblewrap is package-manager-significant because a small CLI becomes part of the desktop Linux trust base. Its package version, setuid/user-namespace behavior, CVE history, and distribution kernel defaults can affect whether higher-level sandboxing stacks actually work.

It is also a clean example of separating mechanism from policy: package the tiny sandbox constructor once, let Flatpak and peers define the higher-level sandbox rules.

### 时间线

- Pre-2016: Code lineage passes through linux-user-chroot and xdg-app helper.
- 2016: Public GitHub repository for bubblewrap is created.
- 2010s: bubblewrap becomes associated with Flatpak-style application sandboxing.
- 2020s: setuid mode is removed; user namespaces are the documented sandbox basis.
- 2026: Tags include v0.11.x, showing continuing maintenance.

### Related projects

- Flatpak is the most prominent higher-level application sandbox stack using bubblewrap.
- xdg-app helper is part of bubblewrap's code lineage.
- linux-user-chroot is an older related sandbox/chroot tool in the lineage.
- Firejail is a comparable desktop sandboxing project discussed in the bubblewrap README.
- xdg-dbus-proxy is commonly paired with bubblewrap to mediate D-Bus access.

### 来源

- <https://api.github.com/repos/containers/bubblewrap>
- <https://api.github.com/repos/containers/bubblewrap/tags?per_page=10>
- <https://github.com/containers/bubblewrap#readme>
- source_facts.package-manager


## 安全说明

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:** bubblewrap
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Requirements:** linux
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - bubblewrap - 0.11.0-2+deb13u1: normalized package name match | Debian stable package indexes: bubblewrap from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | utility for unprivileged chroot and namespace manipulation | https://github.com/containers/bubblewrap
- Nix - bubblewrap: normalized package name match | nixpkgs package indexes: pkgs/by-name/bu/bubblewrap/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - bubblewrap - 0.9.0-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: bubblewrap from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | utility for unprivileged chroot and namespace manipulation | https://github.com/containers/bubblewrap
- apk - bubblewrap - 0.11.2-r0: normalized package name match | Alpine Linux edge package indexes: bubblewrap from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Unprivileged sandboxing tool | https://github.com/containers/bubblewrap
- apk - bubblewrap-bash-completion - 0.11.2-r0: normalized package name match | Alpine Linux edge package indexes: bubblewrap-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Bash completions for bubblewrap | https://github.com/containers/bubblewrap
- apk - bubblewrap-doc - 0.11.2-r0: normalized package name match | Alpine Linux edge package indexes: bubblewrap-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Unprivileged sandboxing tool (documentation) | https://github.com/containers/bubblewrap
- apk - bubblewrap-static - 0.11.2-r0: normalized package name match | Alpine Linux edge package indexes: bubblewrap-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Unprivileged sandboxing tool (static binary) | https://github.com/containers/bubblewrap
- apk - bubblewrap-zsh-completion - 0.11.2-r0: normalized package name match | Alpine Linux edge package indexes: bubblewrap-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Zsh completions for bubblewrap | https://github.com/containers/bubblewrap
- dnf - bubblewrap - 0.11.2-2.fc45: normalized package name match | Fedora Rawhide package metadata: bubblewrap from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Core execution tool for unprivileged containers | https://github.com/containers/bubblewrap/
- pacman - bubblewrap - 0.11.2-1: normalized package name match | Arch Linux sync databases: bubblewrap from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Unprivileged sandboxing tool | https://github.com/containers/bubblewrap
- zypper - bubblewrap - 0.11.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: bubblewrap from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Core execution tool for unprivileged containers | https://github.com/containers/bubblewrap
- zypper - bubblewrap-zsh-completion - 0.11.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: bubblewrap-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Zsh tab-completion for bubblewrap | https://github.com/containers/bubblewrap


## 相关链接

- [Cloud CLI packages](https://pkg.so/zh-hans/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [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.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [libcap](https://pkg.so/zh-hans/brew/libcap/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [ninja](https://pkg.so/zh-hans/brew/ninja/) - Build dependency declared by Homebrew.
- [meson](https://pkg.so/zh-hans/brew/meson/) - Build dependency declared by Homebrew.
- [libxslt](https://pkg.so/zh-hans/brew/libxslt/) - Build dependency declared by Homebrew.
- [landrun](https://pkg.so/zh-hans/brew/landrun/) - Shares pkgdb curated category or tags: cli, linux, sandbox, sandboxing, security.
- [libseccomp](https://pkg.so/zh-hans/brew/libseccomp/) - Shares pkgdb curated category or tags: cli, linux, sandboxing, security.
- [fence](https://pkg.so/zh-hans/brew/fence/) - Shares pkgdb curated category or tags: cli, sandbox, sandboxing, security.
- [syft](https://pkg.so/zh-hans/brew/syft/) - Shares pkgdb curated category or tags: cli, containers, security.
- [grype](https://pkg.so/zh-hans/brew/grype/) - Shares pkgdb curated category or tags: cli, containers, security.
- [linux-pam](https://pkg.so/zh-hans/brew/linux-pam/) - Shares pkgdb curated category or tags: cli, linux, security.
- [libcap-ng](https://pkg.so/zh-hans/brew/libcap-ng/) - Shares pkgdb curated category or tags: cli, linux, security.

## Combined YAML source

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