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

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

## 安装

```sh
sudo av install brew:libzip
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libzip
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libzip
```

  证据: MacPorts ports tree: archivers/libzip/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libzip
```

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

- dnf (92%):

```sh
sudo dnf install libzip
```

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

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

- pacman (92%):

```sh
sudo pacman -S libzip
```

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

- Debian apt (92%):

```sh
sudo apt install libzip-dev
```

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

- zypper (92%):

```sh
sudo zypper install libzip-devel
```

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

## 软件包事实

- **软件包键:** brew:libzip
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/libzip>
- **版本:** 1.11.4
- **来源摘要:** C library for reading, creating, and modifying zip archives
- **主页:** <https://libzip.org/>
- **上游文档:** <https://libzip.org/>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://libzip.org/download/libzip-1.11.4.tar.xz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- zipcmp (cli)
- zipmerge (cli)
- ziptool (cli)
- zipcmp (别名)
- zipmerge (别名)
- ziptool (别名)

## 依赖

- xz
- zstd

## 构建依赖

- cmake

## macOS 提供的库

- bzip2

## 安装行为

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

## 版本和新鲜度

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

libzip is a C library by Dieter Baron and Thomas Klausner for reading, creating, and modifying ZIP archives, with small companion tools such as zipcmp, zipmerge, and ziptool.

### 项目历史

The libzip license page carries copyright years beginning in 1999 for Dieter Baron and Thomas Klausner. The project news records the first standalone release, libzip 0.6, on June 9, 2005, when the API was overhauled, the license changed to the three-clause BSD license, man pages were added, and zipcmp and zipmerge were installed.

libzip 1.0 was released on May 3, 2015 with an I/O abstraction layer, native Windows file API support, file modification time support, the zip_error_t type, and a security fix for CVE-2015-2331. The official repository moved from the project Mercurial server to GitHub on December 8, 2017 to make contribution via issues and pull requests easier.

### 采用历史

libzip spread because it solves the library case that Info-ZIP-style tools do not: programmatic archive editing with a C API, package-manager-friendly licensing, and no requirement to shell out to zip or unzip. Its own packages page tracks distribution packaging, and the API documentation is structured around both reading and creating or modifying archives.

The project continued to add archive-format features used by downstream software: Zip64 and UTF-8 work in 0.11 in 2013, AES encryption in 1.2.0 in 2017, bzip2 support in 1.3.0 in 2017, traditional PKWare encryption support in 1.7.0 in 2020, and zstd and lzma support in 1.8.0 in 2021.

### 使用方式

Developers use libzip when an application needs structured ZIP access: opening archives, reading entries, adding or replacing files, setting comments, changing compression or encryption, working with source callbacks, and closing modified archives. The command-line programs are useful for package tests, archive comparison, merging, and scripted edits.

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

libzip matters in package graphs because ZIP is not just a file-compression format: it underlies EPUB, OOXML, OpenDocument, Java archives, app bundles, firmware, and asset containers. A small C library that can modify ZIP archives safely becomes a dependency for runtimes, document tools, language bindings, and build systems.

### 时间线

- 1999: libzip copyright history begins with Dieter Baron and Thomas Klausner.
- 2005-06-09: libzip 0.6 became the first standalone release.
- 2013-03-23: libzip 0.11 added Zip64 and UTF-8 support.
- 2015-05-03: libzip 1.0 introduced an I/O abstraction layer and fixed CVE-2015-2331.
- 2017-12-08: The official repository moved from Mercurial to GitHub.
- 2021-06-18: libzip 1.8.0 added zstd and lzma compression support.

### Related projects

- libzip sits beside command-line ZIP implementations rather than replacing them. Related concepts and projects include Info-ZIP tools, PKWARE ZIP specifications, zlib, language bindings, and the many document and package formats built on ZIP containers.

### 来源

- <https://libzip.org/documentation/libzip/>
- <https://libzip.org/license/>
- <https://libzip.org/news/>
- <https://libzip.org/packages/>


## 安全说明

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:** libzip
- **Version Scheme:** 0
- **Revision:** 1
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - libzip-dev - 1.11.3-2: normalized package name match | Debian stable package indexes: libzip-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library for reading, creating, and modifying zip archives (development) | https://libzip.org
- Debian apt - libzip5 - 1.11.3-2: normalized package name match | Debian stable package indexes: libzip5 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library for reading, creating, and modifying zip archives (runtime) | https://libzip.org
- Debian apt - zipcmp - 1.11.3-2: normalized package name match | Debian stable package indexes: zipcmp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | compare contents of zip archives | https://libzip.org
- Debian apt - zipmerge - 1.11.3-2: normalized package name match | Debian stable package indexes: zipmerge from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | merge zip archives | https://libzip.org
- Debian apt - ziptool - 1.11.3-2: normalized package name match | Debian stable package indexes: ziptool from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | modify zip archives | https://libzip.org
- Nix - libzip: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libzip/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libzip-dev - 1.7.3-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libzip-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library for reading, creating, and modifying zip archives (development) | https://libzip.org
- Ubuntu apt - libzip4t64 - 1.7.3-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libzip4t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library for reading, creating, and modifying zip archives (runtime) | https://libzip.org
- Ubuntu apt - zipcmp - 1.7.3-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: zipcmp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | compare contents of zip archives | https://libzip.org
- Ubuntu apt - zipmerge - 1.7.3-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: zipmerge from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | merge zip archives | https://libzip.org
- Ubuntu apt - ziptool - 1.7.3-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: ziptool from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | modify zip archives | https://libzip.org
- apk - libzip - 1.11.4-r2: normalized package name match | Alpine Linux edge package indexes: libzip from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C library for manipulating zip archives | https://libzip.org/
- apk - libzip-dev - 1.11.4-r2: normalized package name match | Alpine Linux edge package indexes: libzip-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C library for manipulating zip archives (development files) | https://libzip.org/
- apk - libzip-doc - 1.11.4-r2: normalized package name match | Alpine Linux edge package indexes: libzip-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C library for manipulating zip archives (documentation) | https://libzip.org/
- apk - libzip-tools - 1.11.4-r2: normalized package name match | Alpine Linux edge package indexes: libzip-tools from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | libzip cmp and merge tools | https://libzip.org/
- dnf - libzip - 1.11.4-5.fc45: normalized package name match | Fedora Rawhide package metadata: libzip from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | C library for reading, creating, and modifying zip archives | https://libzip.org/


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Archive and compression packages](https://pkg.so/zh-hans/archive-compression-tools/) - Matched archive or compression metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [xz](https://pkg.so/zh-hans/brew/xz/) - Runtime dependency declared by Homebrew.
- [zstd](https://pkg.so/zh-hans/brew/zstd/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [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.
- [php@8.1](https://pkg.so/zh-hans/brew/php-8-1/) - Popular package that depends on this formula.
- [imagemagick-full](https://pkg.so/zh-hans/brew/imagemagick-full/) - Popular package that depends on this formula.
- [ideviceinstaller](https://pkg.so/zh-hans/brew/ideviceinstaller/) - Popular package that depends on this formula.
- [pstoedit](https://pkg.so/zh-hans/brew/pstoedit/) - Popular package that depends on this formula.
- [libzzip](https://pkg.so/zh-hans/brew/libzzip/) - Shares pkgdb curated category or tags: archive, cli, library, system, zip.
- [ouch](https://pkg.so/zh-hans/brew/ouch/) - Shares pkgdb curated category or tags: archive, cli, compression, system.
- [pax](https://pkg.so/zh-hans/brew/pax/) - Shares pkgdb curated category or tags: archive, cli, system.
- [afio](https://pkg.so/zh-hans/brew/afio/) - Shares pkgdb curated category or tags: archive, cli, system.
- [lunzip](https://pkg.so/zh-hans/brew/lunzip/) - Shares pkgdb curated category or tags: archive, c, cli, compression, system.
- [clzip](https://pkg.so/zh-hans/brew/clzip/) - Shares pkgdb curated category or tags: archive, c, cli, compression, system.
- [unzip](https://pkg.so/zh-hans/brew/unzip/) - Shares pkgdb curated category or tags: cli, compression, system, zip.
- [squashfs](https://pkg.so/zh-hans/brew/squashfs/) - Local package facts share a topical domain. Shared terms: archive, cli, compression, system, xz.
- [borgbackup](https://pkg.so/zh-hans/brew/borgbackup/) - Local package facts share a topical domain. Shared terms: archive, cli, compression, system, zstd.

## Combined YAML source

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