# 使用 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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
- **软件包管理器页面:** <https://formulae.brew.sh/formula/thrift>
- **版本:** 0.24.0
- **来源摘要:** Framework for scalable cross-language services development
- **主页:** <https://thrift.apache.org/>
- **仓库:** <https://github.com/apache/thrift>
- **上游文档:** <https://thrift.apache.org/>
- **许可证:** Apache-2.0
- **源码归档:** <https://www.apache.org/dyn/closer.lua?path=thrift/0.24.0/thrift-0.24.0.tar.gz>
- **最后更新:** 2026-07-12T03:22:20Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- thrift (cli)
- thrift (别名)

## 依赖

- openssl@3

## 构建依赖

- bison
- boost

## 安装行为

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

## 版本和新鲜度

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

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** thrift
- **Aliases:** thrift@0.24
- **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 - 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/


## 相关链接

- [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.
- [openssl@3](https://pkg.so/zh-hans/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [bison](https://pkg.so/zh-hans/brew/bison/) - Build dependency declared by Homebrew.
- [apache-arrow](https://pkg.so/zh-hans/brew/apache-arrow/) - Popular package that depends on this formula.
- [fbthrift](https://pkg.so/zh-hans/brew/fbthrift/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools, rpc, serialization.
- [protobuf-c](https://pkg.so/zh-hans/brew/protobuf-c/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools, serialization.
- [capnp](https://pkg.so/zh-hans/brew/capnp/) - Shares pkgdb curated category or tags: cli, developer-tools, rpc, serialization.
- [protoc-gen-go-grpc](https://pkg.so/zh-hans/brew/protoc-gen-go-grpc/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools, rpc.
- [flatbuffers](https://pkg.so/zh-hans/brew/flatbuffers/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools, serialization.
- [nanopb](https://pkg.so/zh-hans/brew/nanopb/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools, serialization.
- [goctl](https://pkg.so/zh-hans/brew/goctl/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools, rpc.
- [kitex](https://pkg.so/zh-hans/brew/kitex/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools, rpc.
- [cargo-generate](https://pkg.so/zh-hans/brew/cargo-generate/) - Local package facts share a topical domain. Shared terms: cli, code, code-generation, developer, developer-tools.
- [grpc](https://pkg.so/zh-hans/brew/grpc/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, framework, generation.

## 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
- 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
