# 使用 Homebrew, pacman, apt, zypper 安装 ctemplate

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

## 安装

```sh
sudo av install brew:ctemplate
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ctemplate
```

  证据: local Homebrew formula metadata

### Linux

- pacman (92%):

```sh
sudo pacman -S ctemplate
```

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

- Debian apt (92%):

```sh
sudo apt install libctemplate-dev
```

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

- zypper (92%):

```sh
sudo zypper install libctemplate-devel
```

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

## 软件包事实

- **软件包键:** brew:ctemplate
- **软件包管理器:** Homebrew
- **版本:** 2.4
- **来源摘要:** Template language for C++
- **主页:** <https://github.com/olafvdspek/ctemplate>
- **仓库:** <https://github.com/olafvdspek/ctemplate>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- diff_tpl_auto_escape (别名)
- make_tpl_varnames_h (别名)
- template-converter (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

ctemplate is a C++ template library with companion command-line tools for template conversion and generated variable-name headers. Its official changelog traces the project from a Google open-source release in 2006 through community-maintained 2.x releases.

### 项目历史

The initial release was made by Google Inc. in March 2006 as a package implementing a simple but powerful template language for C++. Early releases added portability work, escaping modes, editor support, and threading/build variants.

In the 2.0 release in January 2012, the project changed its official contact, rewrote documentation to refer to Ctemplate rather than Google Template, renamed Visual Studio files, and updated copyright text to reflect Google's relinquished ownership. Later releases under Olaf van der Spek focused on C++11 fixes, refactoring, and a Python 3 build-tool update.

### 采用历史

The README positions ctemplate as portable C++ infrastructure, tested across Linux distributions, Solaris, FreeBSD, older OS X releases, and Windows Visual C++ versions. Homebrew and other package-manager metadata keep it available as a system C++ library rather than only as vendored source.

### 使用方式

Users link applications against either the threaded ctemplate library or the nothreads variant, and the package installs small helper executables such as make_tpl_varnames_h, template-converter, and diff_tpl_auto_escape.

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

For package maintainers, ctemplate is representative of older Google-era C++ infrastructure: Autotools, platform portability fixes, generated headers, optional thread linkage, and a long-lived ABI-style library package.

### 时间线

- 2006: Initial Google Inc. release.
- 2011: 1.0 release after the 0.x series.
- 2012: 2.0 release renamed project surfaces from Google Template to Ctemplate and reflected Google's relinquished ownership.
- 2020: 2.4 release switched build tooling to Python 3.

### Related projects

- The project originated as Google Template/Ctemplate and remains a C++ templating library rather than a web framework or general text-preprocessor package.

### 来源

- <https://github.com/OlafvdSpek/ctemplate/blob/master/ChangeLog>
- <https://github.com/OlafvdSpek/ctemplate#readme>
- <https://formulae.brew.sh/formula/ctemplate>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - libctemplate-dev - 2.4-4: normalized package name match | Debian stable package indexes: libctemplate-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Simple but powerful template language for C++ - development files | https://github.com/olafvdspek/ctemplate
- Debian apt - libctemplate3t64 - 2.4-4: normalized package name match | Debian stable package indexes: libctemplate3t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Simple but powerful template language for C++ | https://github.com/olafvdspek/ctemplate
- Ubuntu apt - libctemplate-dev - 2.4-3.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libctemplate-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Simple but powerful template language for C++ - development files | https://github.com/olafvdspek/ctemplate
- Ubuntu apt - libctemplate3t64 - 2.4-3.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libctemplate3t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Simple but powerful template language for C++ | https://github.com/olafvdspek/ctemplate
- pacman - ctemplate - 2.4-4: normalized package name match | Arch Linux sync databases: ctemplate from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A library implementing a simple but powerful template language for C++ | https://github.com/olafvdspek/ctemplate
- zypper - libctemplate-devel - 2.4-1.18: normalized package name match | openSUSE Tumbleweed package metadata: libctemplate-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for ctemplate, a C++ language templating library | https://github.com/OlafvdSpek/ctemplate
- zypper - libctemplate3 - 2.4-1.18: normalized package name match | openSUSE Tumbleweed package metadata: libctemplate3 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Library for a C++ template languaging | https://github.com/OlafvdSpek/ctemplate


## Combined YAML source

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