# 使用 Homebrew, dnf 安装 gtk+

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

## 安装

```sh
sudo av install brew:gtk+
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gtk+
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install gtk+
```

  证据: Fedora Rawhide package metadata: gtk+ from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

## 软件包事实

- **软件包键:** brew:gtk+
- **软件包管理器:** Homebrew
- **版本:** 2.24.33
- **来源摘要:** GUI toolkit
- **主页:** <https://gtk.org/>
- **最后更新:** 2026-08-02T20:52:09+09:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gtk-builder-convert (别名)
- gtk-demo (别名)
- gtk-query-immodules-2.0 (别名)
- gtk2-update-icon-cache (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

GTK is the GNOME-hosted widget toolkit for building graphical user interfaces, written in C and built on GLib. The Homebrew gtk+ formula represents the GTK+ 2 version track, a long-lived ABI era that many older Unix desktop applications and libraries were written against.

GTK+ 2 matters historically because it was the toolkit generation that carried much of the GNOME 2 desktop ecosystem, the classic gtk+-2.0 pkg-config identity, and a large body of applications through the 2000s and 2010s.

### 项目历史

GTK sources carry the older 'The GIMP Toolkit' identity in project files, and the GTK web site places project copyright from 1997 onward. The project became a GNOME-hosted, LGPL-licensed toolkit with GLib as its foundation and a programming model centered on widgets, signals, GObject, and language bindings.

GTK+ 2.0.0 tarballs appeared in the GNOME source archive on 2002-03-08. The 2.x line standardized the gtk+-2.0 development package identity and became the common target for a large generation of GNOME and cross-platform Unix GUI software.

GTK+ 2.24.0 was tagged in 2011, and the 2.24 series became the terminal GTK+ 2 branch exposed by many package managers. The GNOME source archive shows GTK+ 2.24.33 tarballs dated 2020-12-21, illustrating the long maintenance tail of the GTK+ 2 API track.

### 采用历史

GTK adoption is intertwined with GNOME, but the official GTK site emphasizes broader use: applications built with GTK include GIMP, Fonts, Calculator, Web, Inkscape, Evolution, Image Viewer, Polari, Podcasts, Maps, Transmission, Secrets, and HandBrake. GTK+ 2 was especially visible in traditional desktop apps that predate the GTK 3 and GTK 4 application models.

Language bindings are a major adoption path. The GTK site notes bindings and wrappers for languages such as Python, JavaScript, Perl, Rust, and Vala, and the GTK+ 2 era helped make GTK a common package dependency outside pure C projects.

### 使用方式

Developers build GTK+ 2 applications against headers such as gtk/gtk.h and pkg-config metadata such as gtk+-2.0. The toolkit supplies windows, buttons, text views, tree views, menus, dialogs, input handling, theming, accessibility integration, and GDK backends for display systems.

The Homebrew gtk+ package exposes GTK+ 2 utilities such as gtk-demo, gtk-builder-convert, gtk-query-immodules-2.0, and gtk2-update-icon-cache. That makes the formula useful both for building older applications and for keeping their auxiliary tooling available.

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

GTK+ 2 is package-manager archaeology in productive form. Its ABI is old enough that modern desktops may not use it for new work, but many source builds, ports, plugins, and legacy applications still ask for gtk+-2.0 explicitly.

Packagers care about GTK+ 2 because it pulls a historical GNOME stack with GLib, Pango, GDK-Pixbuf, ATK, Cairo, icon caches, input modules, and theme engines. A missing gtk+ formula can be the difference between a legacy GUI package building cleanly and a dependency hunt through old desktop infrastructure.

### 时间线

- 1997: GTK project copyright period begins on the official GTK site.
- 2002: GTK+ 2.0.0 tarballs appeared in the GNOME source archive.
- 2011: GTK+ 2.24.0 was tagged.
- 2020: GTK+ 2.24.33 tarballs appeared in the GNOME source archive.

### Related projects

- GLib provides fundamental data types and system integration; GObject supplies the object system; GDK handles windowing; Pango handles text; Cairo handles drawing; GdkPixbuf handles images; ATK supplies accessibility interfaces.
- GTK+ 3 and GTK 4 are later GTK API generations. GTK-Doc documented large parts of the GTK/GNOME C API ecosystem, including GTK symbols, GObject signals, and properties.

### 来源

- <https://docs.gtk.org/gtk2/>
- <https://download.gnome.org/sources/gtk+/2.0/>
- <https://download.gnome.org/sources/gtk+/2.24/>
- <https://gitlab.gnome.org/GNOME/gtk>
- <https://gitlab.gnome.org/GNOME/gtk/-/blob/ae0d0fcb6156edd8f64a4628606589b0e593db3a/gtk/deprecated/gtkdialog.c>
- <https://gitlab.gnome.org/GNOME/gtk/-/raw/main/README.md>
- <https://www.gtk.org/>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- dnf - gtk+ - 1.2.10-113.fc45: normalized package name match | Fedora Rawhide package metadata: gtk+ from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | The GIMP ToolKit | http://www.gtk.org/
- dnf - gtk+-devel - 1.2.10-113.fc45: normalized package name match | Fedora Rawhide package metadata: gtk+-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development tools for GTK+ (GIMP ToolKit) applications | http://www.gtk.org/


## Combined YAML source

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