# 使用 Homebrew, apk, dnf, Nix, pacman, zypper 安装 gd

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

## 安装

```sh
sudo av install brew:gd
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gd
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add gd
```

  证据: Alpine Linux edge package indexes: gd from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install gd
```

  证据: Fedora Rawhide package metadata: gd 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#gd
```

  证据: nixpkgs package indexes: pkgs/by-name/gd/gd/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S gd
```

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

- zypper (92%):

```sh
sudo zypper install gd
```

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

## 软件包事实

- **软件包键:** brew:gd
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gd>
- **版本:** 2.3.3
- **来源摘要:** Graphics library to dynamically manipulate images
- **主页:** <https://libgd.github.io/>
- **仓库:** <https://github.com/libgd/libgd>
- **上游文档:** <https://libgd.github.io/>
- **许可证:** GD
- **源码归档:** <https://github.com/libgd/libgd/releases/download/gd-2.3.3/libgd-2.3.3.tar.xz>
- **最后更新:** 2026-08-02T20:52:04+09:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- annotate (cli)
- bdftogd (cli)
- gd2copypal (cli)
- gd2togif (cli)
- gd2topng (cli)
- gdcmpgif (cli)
- gdparttopng (cli)
- gdtopng (cli)
- giftogd2 (cli)
- pngtogd (cli)
- pngtogd2 (cli)
- webpng (cli)
- annotate (别名)
- bdftogd (别名)
- gd2copypal (别名)
- gd2togif (别名)
- gd2topng (别名)
- gdcmpgif (别名)
- gdparttopng (别名)
- gdtopng (别名)
- giftogd2 (别名)
- pngtogd (别名)
- pngtogd2 (别名)
- webpng (别名)

## 依赖

- fontconfig
- freetype
- jpeg-turbo
- libavif
- libpng
- libtiff
- webp

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.3.3
- 管理器更新时间: 2026-08-02
- 本地数据: OK
- 上游仓库: https://github.com/libgd/libgd
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

GD Graphics Library, packaged as gd or libgd, is a C library for dynamic image creation. It is commonly used to generate charts, graphics, thumbnails, and image conversions, especially in web applications.

### 项目历史

The official README and About page state that GD was originally developed by Thomas Boutell and is now maintained by many contributors, with the About page placing maintenance under the PHP.net umbrella. The modern repository describes C99/C++-compatible builds through CMake or configure and broad platform support.

### 采用历史

GD spread through language bindings and web stacks: the official pages name Perl, PHP, Ruby, and other wrappers, and describe web development as its most common application area. Its package-manager life is tied to optional image-format libraries such as libpng, libjpeg, libwebp, libavif, libheif, libtiff, libXpm, FreeType, Fontconfig, libraqm, and libimagequant.

### 使用方式

Applications link libgd to create or transform raster images on demand. Typical uses include chart generation, thumbnailing, format conversion, transparency and blending operations, image transformations, filters, and text rendering when optional font libraries are enabled.

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

GD is a classic dependency package: small at the API surface, but connected to a wide graph of image codecs, language bindings, build systems, and security updates. Its history explains why many Unix package sets carry both libgd itself and a cluster of optional image/font libraries.

### 时间线

- 2015: GitHub records the libgd repository creation.
- 2017: GD 2.2.5 is released with security fixes.
- 2020: GD 2.3.0 is released with multiple security fixes and test additions.
- 2021: GD 2.3.2 adds AVIF and HEIF support, followed by GD 2.3.3 build and bug fixes.
- 2026: The README lists GD 2.3 in bug-fix support, GD 2.4 as active development, and GD 3.0 as early vector/API work.

### Related projects

- PHP.net is the umbrella named by the official About page.
- Perl, PHP, Ruby, and other bindings expose GD to language ecosystems.
- libpng, libjpeg or libjpeg-turbo, libwebp, libavif, libheif, libtiff, libXpm, FreeType, Fontconfig, libraqm, and libimagequant are adjacent optional dependencies.

### 来源

- <https://api.github.com/repos/libgd/libgd>
- <https://api.github.com/repos/libgd/libgd/releases>
- <https://github.com/libgd/libgd>
- <https://libgd.github.io/>
- <https://libgd.github.io/pages/about.html>
- <https://libgd.github.io/pages/docs.html>
- <https://raw.githubusercontent.com/libgd/libgd/master/CHANGELOG.md>
- <https://raw.githubusercontent.com/libgd/libgd/master/README.md>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gd
- **Aliases:** libgd
- **Version Scheme:** 0
- **Revision:** 6
- **Head Version:** HEAD
- **Conflicts With:** mummer
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Nix - gd: normalized package name match | nixpkgs package indexes: pkgs/by-name/gd/gd/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - gd - 2.3.3-r10: normalized package name match | Alpine Linux edge package indexes: gd from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Library for the dynamic creation of images by programmers | https://libgd.github.io/
- apk - gd-dev - 2.3.3-r10: normalized package name match | Alpine Linux edge package indexes: gd-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Library for the dynamic creation of images by programmers (development files) | https://libgd.github.io/
- apk - gd-doc - 2.3.3-r10: normalized package name match | Alpine Linux edge package indexes: gd-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Library for the dynamic creation of images by programmers (documentation) | https://libgd.github.io/
- apk - libgd - 2.3.3-r10: normalized package name match | Alpine Linux edge package indexes: libgd from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Library for the dynamic creation of images by programmers (libraries) | https://libgd.github.io/
- dnf - gd - 2.3.3-22.fc45: normalized package name match | Fedora Rawhide package metadata: gd from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A graphics library for quick creation of PNG or JPEG images | http://libgd.github.io/
- dnf - gd-devel - 2.3.3-22.fc45: normalized package name match | Fedora Rawhide package metadata: gd-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | The development libraries and header files for gd | http://libgd.github.io/
- dnf - gd-progs - 2.3.3-22.fc45: normalized package name match | Fedora Rawhide package metadata: gd-progs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Utility programs that use libgd | http://libgd.github.io/
- pacman - gd - 2.3.3-9: normalized package name match | Arch Linux sync databases: gd from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Library for the dynamic creation of images by programmers | https://libgd.github.io/
- zypper - gd - 2.3.3-5.1: normalized package name match | openSUSE Tumbleweed package metadata: gd from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Drawing Library for Programs That Use PNG and JPEG Output | https://libgd.github.io/
- zypper - gd-devel - 2.3.3-5.1: normalized package name match | openSUSE Tumbleweed package metadata: gd-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Drawing Library for Programs with PNG and JPEG Output | https://libgd.github.io/
- zypper - gd-devel-32bit - 2.3.3-5.1: normalized package name match | openSUSE Tumbleweed package metadata: gd-devel-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Drawing Library for Programs with PNG and JPEG Output | https://libgd.github.io/
- zypper - libgd3 - 2.3.3-5.1: normalized package name match | openSUSE Tumbleweed package metadata: libgd3 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Drawing Library for Programs That Use PNG and JPEG Output | https://libgd.github.io/
- zypper - libgd3-32bit - 2.3.3-5.1: normalized package name match | openSUSE Tumbleweed package metadata: libgd3-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Drawing Library for Programs That Use PNG and JPEG Output | https://libgd.github.io/


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [libpng](https://pkg.so/zh-hans/brew/libpng/) - Runtime dependency declared by Homebrew.
- [jpeg-turbo](https://pkg.so/zh-hans/brew/jpeg-turbo/) - Runtime dependency declared by Homebrew.
- [fontconfig](https://pkg.so/zh-hans/brew/fontconfig/) - Runtime dependency declared by Homebrew.
- [libtiff](https://pkg.so/zh-hans/brew/libtiff/) - Runtime dependency declared by Homebrew.
- [freetype](https://pkg.so/zh-hans/brew/freetype/) - Runtime dependency declared by Homebrew.
- [webp](https://pkg.so/zh-hans/brew/webp/) - Runtime dependency declared by Homebrew.
- [libavif](https://pkg.so/zh-hans/brew/libavif/) - Runtime dependency declared by Homebrew.
- [graphviz](https://pkg.so/zh-hans/brew/graphviz/) - Popular package that depends on this formula.
- [php](https://pkg.so/zh-hans/brew/php/) - Popular package that depends on this formula.
- [php@8.3](https://pkg.so/zh-hans/brew/php-8-3/) - Popular package that depends on this formula.
- [php@8.2](https://pkg.so/zh-hans/brew/php-8-2/) - Popular package that depends on this formula.
- [php@8.4](https://pkg.so/zh-hans/brew/php-8-4/) - Popular package that depends on this formula.
- [gnuplot](https://pkg.so/zh-hans/brew/gnuplot/) - Popular package that depends on this formula.
- [php@8.1](https://pkg.so/zh-hans/brew/php-8-1/) - Popular package that depends on this formula.
- [pstoedit](https://pkg.so/zh-hans/brew/pstoedit/) - Popular package that depends on this formula.
- [imagemagick](https://pkg.so/zh-hans/brew/imagemagick/) - Shares pkgdb curated category or tags: cli, graphics, image-processing, library, media.
- [jasper](https://pkg.so/zh-hans/brew/jasper/) - Shares pkgdb curated category or tags: c, cli, image-processing, library, media.
- [vips](https://pkg.so/zh-hans/brew/vips/) - Shares pkgdb curated category or tags: c, cli, image-processing, library, media.
- [imagemagick@6](https://pkg.so/zh-hans/brew/imagemagick-6/) - Shares pkgdb curated category or tags: cli, graphics, image-processing, library, media.
- [babl](https://pkg.so/zh-hans/brew/babl/) - Shares pkgdb curated category or tags: cli, graphics, image-processing, library, media.
- [gegl](https://pkg.so/zh-hans/brew/gegl/) - Shares pkgdb curated category or tags: cli, graphics, image-processing, library, media.
- [libsail](https://pkg.so/zh-hans/brew/libsail/) - Shares pkgdb curated category or tags: cli, graphics, image-processing, library, media.
- [exact-image](https://pkg.so/zh-hans/brew/exact-image/) - Shares pkgdb curated category or tags: cli, graphics, image-processing, library, media.

## Combined YAML source

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