# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.11.4
- **来源摘要:** C library for reading, creating, and modifying zip archives
- **主页:** <https://libzip.org/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | C library for reading, creating, and modifying zip archives | https://libzip.org/


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
