# Install libdatrie with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Double-Array Trie Library. Version 0.2.14 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:libdatrie
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libdatrie
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libdatrie
```

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

### Linux

- apk (92%):

```sh
sudo apk add libdatrie
```

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

- Debian apt (92%):

```sh
sudo apt install libdatrie-dev
```

  Evidence: Debian stable package indexes: libdatrie-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install libdatrie
```

  Evidence: Fedora Rawhide package metadata: libdatrie from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libdatrie
```

  Evidence: nixpkgs package indexes: pkgs/by-name/li/libdatrie/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S libdatrie
```

  Evidence: Arch Linux sync databases: libdatrie from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install libdatrie-devel
```

  Evidence: openSUSE Tumbleweed package metadata: libdatrie-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:libdatrie
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libdatrie>
- **Version:** 0.2.14
- **Source summary:** Double-Array Trie Library
- **Homepage:** <https://github.com/tlwg/libdatrie>
- **Repository:** <https://github.com/tlwg/libdatrie>
- **Upstream docs:** <https://github.com/tlwg/libdatrie#readme>
- **License:** LGPL-2.1-or-later
- **Source archive:** <https://github.com/tlwg/libdatrie/releases/download/v0.2.14/libdatrie-0.2.14.tar.xz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- trietool (cli)
- trietool-0.2 (cli)
- trietool (alias)
- trietool-0.2 (alias)

## Build dependencies

- pkgconf

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.2.14
- Local data: ok
- Upstream repository: https://github.com/tlwg/libdatrie
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

libdatrie is Theppitak Karoonboonyanan's C implementation of a double-array trie, packaged as a small LGPL library plus the trietool command. It occupies a durable niche in text-processing stacks that need compact dictionary lookup.

### Project history

The upstream README traces libdatrie to an earlier C++ library named midatrie and to Junichi Aoe's double-array trie structure. The project page says the implementation was simplified and rewritten from scratch in C, with libdatrie 0.1.0 released on 18 September 2006.

Release notes show a conservative library-maintenance rhythm: ABI and file-format changes before 0.2.0, portability fixes for Mac, Cygwin, MinGW, NetBSD, and Windows, Doxygen documentation updates, serialization APIs, and build-system cleanup. The package has stayed intentionally focused on the data structure rather than becoming a broad NLP toolkit.

### Adoption history

The README frames tries as useful for lexical analyzers and spelling dictionaries, and the NEWS file explicitly mentions LibThai word-breaking performance improvements in 2015. Its package availability across Homebrew, Debian, Fedora, Arch, Nix, MacPorts, and other systems reflects its role as a low-level dependency rather than a widely invoked application.

### How it is used

Users can link the C library for trie storage and lookup or use trietool to create and inspect trie data. The alphabet-map detail in the original project notes is important: applications define a compact character mapping before building trie storage.

### Why package nerds care

libdatrie is the kind of package that shows why distro dependency graphs matter: a tiny C library, an old but useful data structure, a command-line utility, and years of portability fixes that keep language and dictionary packages building cleanly.

### Timeline

- 2001: The older midatrie C++ releases appeared on the original project page.
- 2006: libdatrie 0.1.0 was released as a C rewrite with a BASE-TAIL double-array trie structure.
- 2009: libdatrie 0.2.0 added performance APIs and started the 0.2 series.
- 2015: libdatrie 0.2.9 renamed trietool-0.2 to trietool and documented LibThai performance improvements.
- 2018: libdatrie 0.2.11 and 0.2.12 focused on correctness, C90 portability, and compiler-warning fixes.
- 2021: libdatrie 0.2.13 added memory-buffer serialization APIs and more portability fixes.
- 2025: libdatrie 0.2.14 cleaned up build dependencies, parallel-build issues, and error handling.

### Related projects

- midatrie is the direct predecessor. LibThai is a notable downstream text-processing user, and Aoe's double-array trie paper is the algorithmic reference cited by upstream.

### Sources

- <https://github.com/tlwg/libdatrie>
- <https://linux.thai.net/~thep/datrie/datrie.html>
- <https://raw.githubusercontent.com/tlwg/libdatrie/master/NEWS>
- <https://raw.githubusercontent.com/tlwg/libdatrie/master/README>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - libdatrie-dev - 0.2.13-3+b1: normalized package name match | Debian stable package indexes: libdatrie-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for double-array trie library | https://linux.thai.net/projects/libthai
- Debian apt - libdatrie-doc - 0.2.13-3: normalized package name match | Debian stable package indexes: libdatrie-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Documentation files for double-array trie library | https://linux.thai.net/projects/libthai
- Debian apt - libdatrie1 - 0.2.13-3+b1: normalized package name match | Debian stable package indexes: libdatrie1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Double-array trie library | https://linux.thai.net/projects/libthai
- Debian apt - libdatrie1-bin - 0.2.13-3+b1: normalized package name match | Debian stable package indexes: libdatrie1-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Programs for double-array trie library | https://linux.thai.net/projects/libthai
- Nix - libdatrie: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libdatrie/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libdatrie-dev - 0.2.13-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libdatrie-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Development files for double-array trie library | https://linux.thai.net/projects/libthai
- Ubuntu apt - libdatrie-doc - 0.2.13-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libdatrie-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Documentation files for double-array trie library | https://linux.thai.net/projects/libthai
- Ubuntu apt - libdatrie1 - 0.2.13-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libdatrie1 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Double-array trie library | https://linux.thai.net/projects/libthai
- Ubuntu apt - libdatrie1-bin - 0.2.13-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libdatrie1-bin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Programs for double-array trie library | https://linux.thai.net/projects/libthai
- apk - libdatrie - 0.2.14-r1: normalized package name match | Alpine Linux edge package indexes: libdatrie from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Double-array trie library | https://github.com/tlwg/libdatrie
- apk - libdatrie-dev - 0.2.14-r1: normalized package name match | Alpine Linux edge package indexes: libdatrie-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Double-array trie library (development files) | https://github.com/tlwg/libdatrie
- apk - libdatrie-doc - 0.2.14-r1: normalized package name match | Alpine Linux edge package indexes: libdatrie-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Double-array trie library (documentation) | https://github.com/tlwg/libdatrie
- apk - libdatrie-libs - 0.2.14-r1: normalized package name match | Alpine Linux edge package indexes: libdatrie-libs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Double-array trie library (libraries) | https://github.com/tlwg/libdatrie
- dnf - libdatrie - 0.2.14-2.fc44: normalized package name match | Fedora Rawhide package metadata: libdatrie from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Implementation of Double-Array structure for representing trie | http://linux.thai.net/projects/datrie
- dnf - libdatrie-devel - 0.2.14-2.fc44: normalized package name match | Fedora Rawhide package metadata: libdatrie-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for libdatrie | http://linux.thai.net/projects/datrie
- pacman - libdatrie - 0.2.14-1: normalized package name match | Arch Linux sync databases: libdatrie from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Double-array trie library | https://linux.thai.net/projects/datrie


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [flickcurl](https://www.automicvault.com/pkg/brew/flickcurl/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [glib](https://www.automicvault.com/pkg/brew/glib/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [gwenhywfar](https://www.automicvault.com/pkg/brew/gwenhywfar/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [hidapi](https://www.automicvault.com/pkg/brew/hidapi/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [json-glib](https://www.automicvault.com/pkg/brew/json-glib/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [libcmph](https://www.automicvault.com/pkg/brew/libcmph/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [libdeflate](https://www.automicvault.com/pkg/brew/libdeflate/) - Shares av.db curated category or tags: c, cli, developer-tools, libraries, library.
- [marisa](https://www.automicvault.com/pkg/brew/marisa/) - Shares av.db curated category or tags: cli, developer-tools, libraries, library, trie.
- [protobuf-c](https://www.automicvault.com/pkg/brew/protobuf-c/) - Local package facts share a topical domain. Shared terms: c, cli, developer, developer-tools, libraries.

## Combined YAML source

View the package source record on GitHub. [combined/libdatrie.yml](https://github.com/automic-vault/db/blob/main/combined/libdatrie.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
