# 使用 Homebrew, Nix 安装 libtensorflow

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

## 安装

```sh
sudo av install brew:libtensorflow
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libtensorflow
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#libtensorflow
```

  证据: nixpkgs package indexes: libtensorflow from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

## 软件包事实

- **软件包键:** brew:libtensorflow
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/libtensorflow>
- **版本:** 2.21.0
- **来源摘要:** C interface for Google's OS library for Machine Intelligence
- **主页:** <https://www.tensorflow.org/>
- **仓库:** <https://github.com/tensorflow/tensorflow>
- **上游文档:** <https://www.tensorflow.org/api_docs>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.21.0.tar.gz>
- **最后更新:** 2026-06-22T14:05:23-07:00
- **已生成:** 2026-07-25T07:20:51+00:00

## 可执行文件

- benchmark_model (cli)
- summarize_graph (cli)
- transform_graph (cli)
- benchmark_model (别名)
- summarize_graph (别名)
- transform_graph (别名)

## 构建依赖

- bazelisk
- gnu-getopt
- numpy
- python@3.13

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-25
- 管理器版本: 2.21.0
- 管理器更新时间: 2026-06-22
- 本地数据: OK
- 上游仓库: https://github.com/tensorflow/tensorflow
- 检测到的最新版本: v2.21.0 (当前)
## 项目历史与用法

libtensorflow is the packaged C interface to TensorFlow, Google's open-source machine-learning platform. In package-manager terms it is the part of TensorFlow that lets non-Python programs bind to TensorFlow's runtime through C headers and shared libraries.

### 项目历史

Google announced TensorFlow as an open-source release on November 9, 2015, describing it as the second-generation machine-learning system built after DistBelief. The announcement emphasized portability, production readiness, Apache 2.0 licensing, and use across Google research and products.

The TensorFlow repository README says the framework was originally developed by researchers and engineers in the Google Brain Machine Intelligence team for machine-learning and neural-network research, while also being versatile enough for other areas. The C installation documentation defines the C API in c_api.h and says it is designed for simplicity and uniformity rather than convenience.

The libtensorflow packaging story is narrower than TensorFlow's Python ecosystem. It provides downloadable C library archives, headers, and shared libraries for supported operating systems, so language bindings and C/C++ applications can use TensorFlow without installing the full Python package path.

### 采用历史

TensorFlow's adoption was unusually fast for machine-learning infrastructure. Google Cloud's 2016 Jeff Dean interview said TensorFlow gained over 11,000 GitHub stars in its first week after launch, and Google's first-year post reported more than 480 direct contributors by November 2016.

By October 20, 2022, the TensorFlow team described the project as adopted by millions of developers, used across Google products, and connected to TensorFlow Lite, TensorFlow.js, Keras, OpenXLA, DTensor, and production model tooling. libtensorflow's adoption follows from that ecosystem as the C ABI surface used by bindings and native applications.

### 使用方式

C users install a libtensorflow archive, include tensorflow/c/c_api.h, link against the shared library, and call functions such as TF_Version. The official C page documents separate Linux, macOS, and Windows archives and notes platform-support endpoints with concrete TensorFlow release numbers.

Package managers expose libtensorflow for users who need native linkage, embedding, or language bindings rather than the normal pip install tensorflow workflow.

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

libtensorflow is interesting because it packages a massive ML system behind a C ABI. That is exactly the kind of boundary package maintainers care about: headers, shared objects, platform archives, ABI compatibility, and wrappers in other languages.

It also shows the tension between fast-moving ML stacks and traditional system packaging. TensorFlow's Python ecosystem moves quickly, while libtensorflow gives distributions and bindings a more conventional binary-library surface.

### 时间线

- 2015: Google open-sources TensorFlow on November 9, 2015.
- 2016: Google reports more than 480 direct TensorFlow contributors during the first year after open-sourcing.
- 2017: TensorFlow 1.0 era establishes the project as a major open-source ML framework.
- 2022: The TensorFlow team publishes a future roadmap emphasizing XLA, DTensor, applied ML tooling, and ecosystem growth.
- 2024: TensorFlow C documentation identifies TensorFlow 2.16 as the last TensorFlow release supporting macOS x86 C packages.
- 2025: TensorFlow C documentation identifies TensorFlow 2.18 as the last release of Linux x86, Windows x86, and Mac Arm64 libtensorflow packages.

### Related projects

- DistBelief is TensorFlow's internal predecessor. TensorFlow Lite, TensorFlow.js, TFX, Keras, OpenXLA, DTensor, and TensorFlow Serving are related ecosystem projects and deployment paths.

### 来源

- <https://blog.tensorflow.org/2022/10/building-the-future-of-tensorflow.html>
- <https://github.com/tensorflow/tensorflow>
- <https://opensource.googleblog.com/2016/11/celebrating-tensorflows-first-year.html>
- <https://research.google/blog/tensorflow-googles-latest-machine-learning-system-open-sourced-for-everyone/>
- <https://www.tensorflow.org/install/lang_c>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

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

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

- Nix - libtensorflow: normalized package name match | nixpkgs package indexes: libtensorflow from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix


## 相关链接

- [MCP tool packages](https://www.automicvault.com/zh-hans/pkg/mcp-tools/) - Mentions MCP or Model Context Protocol.
- [AI and agent packages](https://www.automicvault.com/zh-hans/pkg/ai-agent-tools/) - Matched AI model, agent, coding-agent, orchestration, or MCP metadata.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [bazelisk](https://www.automicvault.com/zh-hans/pkg/brew/bazelisk/) - Build dependency declared by Homebrew.
- [gnu-getopt](https://www.automicvault.com/zh-hans/pkg/brew/gnu-getopt/) - Build dependency declared by Homebrew.
- [numpy](https://www.automicvault.com/zh-hans/pkg/brew/numpy/) - Build dependency declared by Homebrew.
- [python@3.13](https://www.automicvault.com/zh-hans/pkg/brew/python-3-13/) - Build dependency declared by Homebrew.
- [apache-opennlp](https://www.automicvault.com/zh-hans/pkg/brew/apache-opennlp/) - Shares av.db curated category or tags: ai, cli, machine-learning, ml-tools.
- [djl-serving](https://www.automicvault.com/zh-hans/pkg/brew/djl-serving/) - Shares av.db curated category or tags: ai, cli, machine-learning, ml-tools.
- [hf](https://www.automicvault.com/zh-hans/pkg/brew/hf/) - Shares av.db curated category or tags: ai, cli, machine-learning, ml-tools.
- [libsvm](https://www.automicvault.com/zh-hans/pkg/brew/libsvm/) - Shares av.db curated category or tags: ai, cli, machine-learning, ml-tools.
- [lightgbm](https://www.automicvault.com/zh-hans/pkg/brew/lightgbm/) - Shares av.db curated category or tags: ai, cli, machine-learning, ml-tools.
- [magika](https://www.automicvault.com/zh-hans/pkg/brew/magika/) - Shares av.db curated category or tags: ai, cli, machine-learning, ml-tools.
- [mallet](https://www.automicvault.com/zh-hans/pkg/brew/mallet/) - Shares av.db curated category or tags: ai, cli, machine-learning, ml-tools.
- [mitie](https://www.automicvault.com/zh-hans/pkg/brew/mitie/) - Shares av.db curated category or tags: ai, cli, machine-learning, ml-tools.
- [opencv](https://www.automicvault.com/zh-hans/pkg/brew/opencv/) - Local package facts share a topical domain. Shared terms: ai, cli, learning, machine, machine-learning.
- [tesseract](https://www.automicvault.com/zh-hans/pkg/brew/tesseract/) - Local package facts share a topical domain. Shared terms: ai, cli, learning, machine, machine-learning.

## Combined YAML source

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


## 来源

- 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
