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

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

## 安装

```sh
sudo av install brew:libxpm
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libxpm
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add libxpm
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#libxpm
```

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

- pacman (92%):

```sh
sudo pacman -S libxpm
```

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

- Debian apt (92%):

```sh
sudo apt install libxpm-dev
```

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

- dnf (92%):

```sh
sudo dnf install libXpm
```

  证据: Fedora Rawhide package metadata: libXpm from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- zypper (92%):

```sh
sudo zypper install libXpm-devel
```

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

## 软件包事实

- **软件包键:** brew:libxpm
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/libxpm>
- **版本:** 3.5.19
- **来源摘要:** X.Org: X Pixmap (XPM) image file format library
- **主页:** <https://www.x.org/>
- **上游文档:** <https://www.x.org/>
- **许可证:** MIT
- **源码归档:** <https://xorg.freedesktop.org/archive/individual/lib/libXpm-3.5.19.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- cxpm (cli)
- cxpm (别名)

## 依赖

- gettext
- libx11

## 构建依赖

- gettext
- pkgconf

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 3.5.19
- 本地数据: OK
- 上游仓库: https://www.x.org/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

libXpm is the X.Org library for the X Pixmap image format, the text-based color-pixmap format associated with X11 icons, cursors, and small UI images. It packages both the legacy file format support and the cxpm validation utility.

### 项目历史

The X.Org repository README identifies libXpm as the X Pixmap image file format library and points development to freedesktop.org GitLab. The preserved NEWS.old file carries Groupe Bull copyright years 1989-95 and a detailed history of user-visible library changes through the 1990s.

The XPM format grew out of XBM's C-source-friendly bitmap model into a color pixmap format with symbolic colors and transparency. X.Org's archived sxpm manual documents support for XPM versions 1, 2, and 3 and describes sxpm as a viewer and converter for older XPM files.

### 采用历史

libXpm was adopted because X11 applications needed small color icons and pixmaps in a format that could be stored as plain text and embedded in C source. The library traveled with X.Org and downstream distributions, so applications could keep reading old XPM assets without each toolkit carrying its own parser.

### 使用方式

Applications use libXpm to read and write XPM data as X images or pixmaps, while the cxpm tool checks XPM files. Package builds also care about its optional compressed-file behavior because historically libXpm could invoke compress, uncompress, or gzip when opening .Z or .gz pixmap files.

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

libXpm is a classic example of X11 compatibility baggage that still matters. It is small, old, and easy to overlook, yet it appears in dependency graphs for graphical software and has had security-sensitive parser behavior, including compressed-file handling and fixes for malformed image inputs.

### 时间线

- 1989: Groupe Bull copyright begins for the XPM code preserved in NEWS.old.
- 1995: NEWS.old copyright range ends at 1989-95 while 3.4-era releases continue.
- 1996: libXpm 3.4h and 3.4j entries document portability and API improvements.
- 1998: libXpm 3.4k added the cxpm checker according to NEWS.old.
- 2009: X.Org archived the X11R7.5 sxpm manual describing XPM 1, 2, and 3 support.

### Related projects

- libXpm belongs to the X.Org/X11 library family and is related to XBM, Xlib image and pixmap APIs, sxpm, cxpm, and older desktop icon assets used by X applications.

### 来源

- <https://gitlab.freedesktop.org/xorg/lib/libxpm>
- <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/raw/master/NEWS.old>
- <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/raw/master/README.md>
- <https://www.x.org/archive/X11R7.5/doc/man/man1/sxpm.1.html>


## 安全说明

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:** libxpm
- **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

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

- Debian apt - libxpm-dev - 1:3.5.17-1+deb13u1: normalized package name match | Debian stable package indexes: libxpm-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | X11 pixmap library (development headers) | https://www.x.org
- Debian apt - libxpm4 - 1:3.5.17-1+deb13u1: normalized package name match | Debian stable package indexes: libxpm4 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | X11 pixmap library | https://www.x.org
- Debian apt - xpmutils - 1:3.5.17-1+deb13u1: normalized package name match | Debian stable package indexes: xpmutils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | X11 pixmap utilities | https://www.x.org
- Nix - libxpm: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libxpm/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libxpm-dev - 1:3.5.17-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libxpm-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | X11 pixmap library (development headers) | https://www.x.org
- Ubuntu apt - libxpm4 - 1:3.5.17-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libxpm4 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | X11 pixmap library | https://www.x.org
- Ubuntu apt - xpmutils - 1:3.5.17-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: xpmutils from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | X11 pixmap utilities | https://www.x.org
- apk - libxpm - 3.5.19-r0: normalized package name match | Alpine Linux edge package indexes: libxpm from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | X11 pixmap library | https://xorg.freedesktop.org/
- apk - libxpm-dev - 3.5.19-r0: normalized package name match | Alpine Linux edge package indexes: libxpm-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | X11 pixmap library (development files) | https://xorg.freedesktop.org/
- apk - libxpm-doc - 3.5.19-r0: normalized package name match | Alpine Linux edge package indexes: libxpm-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | X11 pixmap library (documentation) | https://xorg.freedesktop.org/
- dnf - libXpm - 3.5.19-4.fc45: normalized package name match | Fedora Rawhide package metadata: libXpm from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | X.Org X11 libXpm runtime library | https://www.x.org
- dnf - libXpm-devel - 3.5.19-4.fc45: normalized package name match | Fedora Rawhide package metadata: libXpm-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | X.Org X11 libXpm development package | https://www.x.org
- pacman - libxpm - 3.5.19-1: normalized package name match | Arch Linux sync databases: libxpm from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | X11 pixmap library | https://xorg.freedesktop.org/
- zypper - libXpm-devel - 3.5.18-2.4: normalized package name match | openSUSE Tumbleweed package metadata: libXpm-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for the X Pixmap image file format library | https://xorg.freedesktop.org/
- zypper - libXpm-devel-32bit - 3.5.18-2.4: normalized package name match | openSUSE Tumbleweed package metadata: libXpm-devel-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for the X Pixmap image file format library | https://xorg.freedesktop.org/
- zypper - libXpm-tools - 3.5.18-2.4: normalized package name match | openSUSE Tumbleweed package metadata: libXpm-tools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Conversion utilities for X Pixmap (XPM) files | https://xorg.freedesktop.org/


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Media and graphics packages](https://pkg.so/zh-hans/media-graphics-tools/) - Matched media, image, audio, video, or graphics metadata.
- [gettext](https://pkg.so/zh-hans/brew/gettext/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [xterm](https://pkg.so/zh-hans/brew/xterm/) - Popular package that depends on this formula.
- [grace](https://pkg.so/zh-hans/brew/grace/) - Popular package that depends on this formula.
- [fricas](https://pkg.so/zh-hans/brew/fricas/) - Popular package that depends on this formula.
- [xfig](https://pkg.so/zh-hans/brew/xfig/) - Popular package that depends on this formula.
- [nedit](https://pkg.so/zh-hans/brew/nedit/) - Popular package that depends on this formula.
- [ddd](https://pkg.so/zh-hans/brew/ddd/) - Popular package that depends on this formula.
- [libxcvt](https://pkg.so/zh-hans/brew/libxcvt/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [mkfontscale](https://pkg.so/zh-hans/brew/mkfontscale/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [mesa](https://pkg.so/zh-hans/brew/mesa/) - Shares pkgdb curated category or tags: cli, graphics, system.
- [xorg-server](https://pkg.so/zh-hans/brew/xorg-server/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xinput](https://pkg.so/zh-hans/brew/xinput/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xauth](https://pkg.so/zh-hans/brew/xauth/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xkbcomp](https://pkg.so/zh-hans/brew/xkbcomp/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xeyes](https://pkg.so/zh-hans/brew/xeyes/) - Shares pkgdb curated category or tags: cli, system, x11, xorg.
- [xdpyinfo](https://pkg.so/zh-hans/brew/xdpyinfo/) - Local package facts share a topical domain. Shared terms: cli, libx11, org, system, x-org.

## Combined YAML source

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