# 使用 Homebrew, apt, apk 安装 kraken2

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

## 安装

```sh
sudo av install brew:kraken2
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install kraken2
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install kraken2
```

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

- apk (92%):

```sh
sudo apk add k2
```

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

## 软件包事实

- **软件包键:** brew:kraken2
- **软件包管理器:** Homebrew
- **版本:** 2.17.1
- **来源摘要:** Taxonomic sequence classification system
- **主页:** <https://github.com/DerrickWood/kraken2>
- **仓库:** <https://github.com/DerrickWood/kraken2>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- k2 (别名)
- kraken2 (别名)
- kraken2-build (别名)
- kraken2-inspect (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Kraken 2 is the second-generation Kraken taxonomic sequence classifier for DNA reads. It matters in bioinformatics packaging because it packages a high-performance, database-heavy scientific CLI into standard Unix package-manager workflows while still reflecting the research tool's unusually large external data requirements.

### 项目历史

The original Kraken classifier was published in Genome Biology in 2014 as an ultrafast metagenomic sequence classification method based on exact k-mer alignments. Kraken 2 was created after Kraken 1's speed exposed a practical problem: large k-mer/LCA databases could demand enough RAM to make the tool hard to run on ordinary workstations.

Kraken 2's manual describes the key redesign: it stores minimizers instead of every k-mer, uses a probabilistic compact hash table, supports translated search against amino-acid databases, and adds spaced seeds and special database support. The Kraken 2 paper was published in Genome Biology on 2019-11-28 and reported lower memory use and faster classification while keeping Kraken-style exact-match taxonomy assignment.

### 采用历史

Kraken 2 became part of the common metagenomics command-line toolkit because it preserved Kraken's CLI-centered workflow while reducing the memory barrier for large microbial reference databases. Its Homebrew, Debian, Ubuntu, Alpine, and source-build packaging reflects the way sequencing labs and HPC users install reproducible command-line tools across mixed Linux and macOS environments.

The project also kept compatibility with the surrounding Kraken ecosystem, including the original Kraken paper lineage and related abundance-estimation workflows such as Bracken, which helped make Kraken 2 an upgrade path rather than a disconnected replacement.

### 使用方式

Users install the program, then build or download a taxonomy database before classifying reads with commands such as kraken2, kraken2-build, and kraken2-inspect. The manual emphasizes that database construction depends on external taxonomy and sequence downloads, disk space, RAM, OpenMP-capable builds, and Unix utilities.

For package managers, Kraken 2 is an example where the packaged executable is only part of the operational story: the large mutable reference database, network downloads, and local storage policy matter as much as the binary.

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

Kraken 2 is a package-nerd case study in scientific software distribution: a small CLI package fronts a large and evolving data dependency that cannot simply be vendored into the formula. It also shows why bioinformatics packages often need both upstream manuals and package-manager metadata to communicate runtime expectations.

### 时间线

- 2014: The original Kraken paper was published in Genome Biology.
- 2018-06-26: The Kraken 2 GitHub repository and v2.0.6-beta release were published.
- 2019-11-28: The Kraken 2 paper was published in Genome Biology.
- 2025-11-24: Kraken 2 v2.17.1 was published on GitHub.

### Related projects

- Kraken 1 is the direct predecessor. Bracken is a related abundance-estimation tool commonly used with Kraken classification output. The broader method family includes other metagenomic classifiers and low-memory variants that respond to the same taxonomy-indexing tradeoffs.

### 来源

- <https://genomebiology.biomedcentral.com/articles/10.1186/gb-2014-15-3-r46>
- <https://github.com/DerrickWood/kraken2>
- <https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown>
- <https://github.com/DerrickWood/kraken2/releases/tag/v2.0.6-beta>
- <https://github.com/DerrickWood/kraken2/releases/tag/v2.17.1>
- <https://link.springer.com/article/10.1186/s13059-019-1891-0>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - kraken2 - 2.1.3-1: normalized package name match | Debian stable package indexes: kraken2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | taxonomic classification system using exact k-mer matches | https://www.ccb.jhu.edu/software/kraken2/
- Ubuntu apt - kraken2 - 2.1.3-1: normalized package name match | Ubuntu 24.04 LTS package indexes: kraken2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | taxonomic classification system using exact k-mer matches | https://www.ccb.jhu.edu/software/kraken2/
- apk - k2 - 0_git20260430-r0: installed executable or alias match | Alpine Linux edge package indexes: k2 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Chess engine with UCI and Xboard interface | https://github.com/serg-meus/k2


## Combined YAML source

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