# 使用 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
- **版本:** 2.21.0
- **来源摘要:** C interface for Google's OS library for Machine Intelligence
- **主页:** <https://www.tensorflow.org/>
- **仓库:** <https://github.com/tensorflow/tensorflow>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.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

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

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


## Combined YAML source

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