# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, zypper, apt, scoop 安装 thrift

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

## 安装

```sh
sudo av install brew:thrift
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install thrift
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install thrift
```

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

### Linux

- apk (92%):

```sh
sudo apk add thrift
```

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

- dnf (92%):

```sh
sudo dnf install thrift
```

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

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

- pacman (92%):

```sh
sudo pacman -S thrift
```

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

- zypper (92%):

```sh
sudo zypper install thrift
```

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

- Debian apt (92%):

```sh
sudo apt install golang-thrift-dev
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/thrift
```

  证据: Scoop official bucket manifest trees: bucket/thrift.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:thrift
- **软件包管理器:** Homebrew
- **版本:** 0.24.0
- **来源摘要:** Framework for scalable cross-language services development
- **主页:** <https://thrift.apache.org/>
- **仓库:** <https://github.com/apache/thrift>
- **最后更新:** 2026-07-12T03:22:20Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- thrift (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Apache Thrift is a cross-language serialization, interface-definition, and RPC framework built around a compiler that turns `.thrift` IDL files into client/server code and data types for many programming languages.

### 项目历史

Thrift began at Facebook, was open sourced in April 2007, entered the Apache Incubator in May 2008, and became an Apache top-level project in October 2010. Apache's own project page describes the goal as efficient, reliable communication and data serialization across languages.

The project settled into the classic compiler-plus-runtime model: developers write service and type definitions in Thrift IDL, run the Thrift compiler, and combine the generated code with the runtime library for each target language. Apache's README describes Thrift as a lightweight, language-independent software stack for point-to-point RPC, with clean abstractions for transport, serialization, and application processing.

### 采用历史

Thrift's adoption pattern follows its cross-language design. Apache documentation says each supported language needs both the generated code from the compiler and the Apache Thrift library for that language, while the language matrix notes broad language support and a large cross-language test matrix.

In package-manager culture, Thrift is widely packaged because it is both a CLI compiler and a family of language runtimes. The input package facts list Homebrew, Debian/Ubuntu, Fedora, Arch, MacPorts, Nix, Scoop, and openSUSE-family packages, often with language-specific package names.

### 使用方式

A typical workflow is to define structs, exceptions, constants, and services in a `.thrift` IDL file, then run the compiler with a target such as `--gen go`, `--gen java`, or another supported backend. The generated code becomes the typed contract used by clients and servers.

Package maintainers care about the compiler/runtime split: projects may need the `thrift` executable at build time, runtime libraries in specific languages, and matching versions so generated code and library APIs agree.

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

Apache Thrift is significant to package nerds because it is a dependency bridge rather than just one executable. A single version bump can matter to C++, Java, Python, Go, Ruby, Node.js, and other ecosystems that consume generated bindings.

It also illustrates why package managers keep code generators around as first-class developer tools: Thrift IDL is often checked into source trees, but the generated output, runtime library, and compiler version still affect reproducibility.

### 时间线

- 2007: Facebook open sourced Thrift.
- 2008: Thrift entered the Apache Incubator.
- 2010: Thrift graduated as an Apache top-level project.
- 2026: Apache Thrift v0.23.0 published on GitHub releases.

### Related projects

- Facebook's fbthrift repository is an evolved internal branch that Facebook re-released in 2014 and explicitly describes as not being a distribution of Apache Thrift.
- CloudWeGo thriftgo is a Go implementation of a Thrift IDL compiler used by the CloudWeGo toolchain.

### 来源

- <https://api.github.com/repos/apache/thrift/releases>
- <https://github.com/apache/thrift>
- <https://github.com/facebook/fbthrift>
- <https://incubator.apache.org/projects/thrift.html>
- <https://thrift.apache.org/about>
- <https://thrift.apache.org/docs/>
- <https://thrift.apache.org/docs/Languages.html>
- <https://thrift.apache.org/docs/idl>
- input source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - golang-thrift-dev - 0.19.0-4: normalized package name match | Debian stable package indexes: golang-thrift-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Go language support for Thrift | https://thrift.apache.org/
- Debian apt - libthrift-0.19.0t64 - 0.19.0-4+b1: normalized package name match | Debian stable package indexes: libthrift-0.19.0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Thrift C++ library | https://thrift.apache.org/
- Debian apt - libthrift-c-glib-dev - 0.19.0-4+b1: normalized package name match | Debian stable package indexes: libthrift-c-glib-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Thrift glib library (development headers) | https://thrift.apache.org/
- Debian apt - libthrift-c-glib0t64 - 0.19.0-4+b1: normalized package name match | Debian stable package indexes: libthrift-c-glib0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Thrift glib library | https://thrift.apache.org/
- Debian apt - libthrift-dev - 0.19.0-4+b1: normalized package name match | Debian stable package indexes: libthrift-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Thrift C++ library (development headers) | https://thrift.apache.org/
- Debian apt - libthrift-perl - 0.19.0-4: normalized package name match | Debian stable package indexes: libthrift-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Perl language support for Thrift | https://thrift.apache.org/
- Debian apt - php-thrift - 0.19.0-4+b1: normalized package name match | Debian stable package indexes: php-thrift from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | PHP language support for Thrift | https://thrift.apache.org/
- Debian apt - python3-thrift - 0.19.0-4+b1: normalized package name match | Debian stable package indexes: python3-thrift from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Python 3 library for Thrift | https://thrift.apache.org/
- Debian apt - thrift-compiler - 0.19.0-4+b1: normalized package name match | Debian stable package indexes: thrift-compiler from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | code generator/compiler for Thrift definitions | https://thrift.apache.org/
- Nix - thrift: normalized package name match | nixpkgs package indexes: pkgs/by-name/th/thrift/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - golang-thrift-dev - 0.19.0-2.1build5: normalized package name match | Ubuntu 24.04 LTS package indexes: golang-thrift-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Go language support for Thrift | https://thrift.apache.org/
- Ubuntu apt - libthrift-0.19.0t64 - 0.19.0-2.1build5: normalized package name match | Ubuntu 24.04 LTS package indexes: libthrift-0.19.0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Thrift C++ library | https://thrift.apache.org/
- Ubuntu apt - libthrift-c-glib-dev - 0.19.0-2.1build5: normalized package name match | Ubuntu 24.04 LTS package indexes: libthrift-c-glib-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Thrift glib library (development headers) | https://thrift.apache.org/
- Ubuntu apt - libthrift-c-glib0t64 - 0.19.0-2.1build5: normalized package name match | Ubuntu 24.04 LTS package indexes: libthrift-c-glib0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Thrift glib library | https://thrift.apache.org/
- Ubuntu apt - libthrift-dev - 0.19.0-2.1build5: normalized package name match | Ubuntu 24.04 LTS package indexes: libthrift-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Thrift C++ library (development headers) | https://thrift.apache.org/
- Ubuntu apt - libthrift-perl - 0.19.0-2.1build5: normalized package name match | Ubuntu 24.04 LTS package indexes: libthrift-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Perl language support for Thrift | https://thrift.apache.org/


## Combined YAML source

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