# Install nghttp2 with Homebrew, apk, apt, dnf, MacPorts, Nix, zypper

HTTP/2 C Library. Version 1.70.0 via Homebrew; verified 2026-08-01. Also installable with debian: sudo apt install libnghttp2-14.

## Install

```sh
sudo av install brew:nghttp2
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install nghttp2
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nghttp2
```

  Evidence: MacPorts ports tree: www/nghttp2/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add nghttp2
```

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

- Debian apt (92%):

```sh
sudo apt install nghttp2
```

  Evidence: Debian stable package indexes: nghttp2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install nghttp2
```

  Evidence: Fedora Rawhide package metadata: nghttp2 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#nghttp2
```

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

- zypper (92%):

```sh
sudo zypper install nghttp2
```

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

## Package facts

- **Package key:** brew:nghttp2
- **Package manager:** Homebrew
- **Version:** 1.70.0
- **Source summary:** HTTP/2 C Library
- **Homepage:** <https://nghttp2.org/>
- **Repository:** <https://github.com/nghttp2/nghttp2>
- **Last updated:** 2026-08-01T13:15:08Z
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- h2load (alias)
- nghttp (alias)
- nghttpd (alias)
- nghttpx (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.70.0
## Project history and usage

nghttp2 is a C implementation of HTTP/2's framing layer plus command-line tools: `nghttp` for client/frame inspection, `nghttpd` for a test server, `nghttpx` for proxying, and `h2load` for benchmarking. It also exposes HPACK encoding and decoding APIs.

### Project history

The project came out of the HTTP/2 standardization period. Its own documentation says the code base was forked from Tatsuhiro Tsujikawa's earlier spdylay project, a C implementation of Google's SPDY protocol, and was originally based on RFC 7540 and RFC 7541 before moving toward RFC 9113.

That origin explains the shape of the package: it is not only a library, but a lab bench for HTTP/2. The tools let implementers speak h2 or h2c directly, inspect frames, run a proxy, and stress-test servers while the library handles the binary framing details.

### Adoption history

nghttp2 became important because large projects did not want to hand-roll HTTP/2 framing. Apache httpd's documentation says `mod_http2` uses nghttp2 as its implementation base and requires libnghttp2 when building HTTP/2 support.

curl also made nghttp2 part of the mainstream HTTP/2 toolchain. curl's 7.43.0 changelog in June 2015 required nghttp2 1.0.0 or later for HTTP/2 multiplexing support, and everything curl documents HTTP/2 support for HTTP and HTTPS when curl is built with the needed prerequisites.

### How it is used

Developers install nghttp2 directly when they need the command-line tools, or indirectly as a dependency for HTTP clients and servers. `nghttp` is useful for seeing HTTP/2 frames rather than just HTTP semantics, while `h2load` is a quick load generator for h2 endpoints.

Packagers care about nghttp2 because it is a protocol-library dependency with ABI and feature implications. A curl or Apache build with libnghttp2 available can expose HTTP/2 support; without it, the package may build but lose protocol behavior that users assume is present.

### Why package nerds care

nghttp2 is the little C library behind a lot of HTTP/2 enablement. It is a classic packaging multiplier: small on its own, but it changes the capabilities of curl, Apache httpd, and other network stacks that link to it.

### Timeline

- 2012: Source files in the nghttp2 tree carry early copyright dates from Tatsuhiro Tsujikawa's implementation work.
- 2013: nghttp2 emerged from the spdylay/SPDY lineage during HTTP/2 standardization.
- 2015-06-17: curl 7.43.0 documented HTTP/2 multiplexing support requiring nghttp2 1.0.0 or later.
- 2015: Apache httpd 2.4 HTTP/2 support standardized around `mod_http2`, which uses libnghttp2 as its implementation base.

### Related projects

- spdylay
- HTTP/2
- HPACK
- curl
- Apache httpd mod_http2

### Sources

- <https://curl.se/changes.html>
- <https://everything.curl.dev/http/versions/http2.html>
- <https://formulae.brew.sh/formula/nghttp2>
- <https://github.com/nghttp2/nghttp2>
- <https://httpd.apache.org/docs/current/howto/http2.html>
- <https://nghttp2.org/documentation/package_README.html>


## Security Notes

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

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Other Package-Manager Records

- Debian apt - libnghttp2-14 - 1.64.0-1.1+deb13u1: normalized package name match | Debian stable package indexes: libnghttp2-14 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library implementing HTTP/2 protocol (shared library) | https://nghttp2.org/
- Debian apt - libnghttp2-dev - 1.64.0-1.1+deb13u1: normalized package name match | Debian stable package indexes: libnghttp2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library implementing HTTP/2 protocol (development files) | https://nghttp2.org/
- Debian apt - libnghttp2-doc - 1.64.0-1.1+deb13u1: normalized package name match | Debian stable package indexes: libnghttp2-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library implementing HTTP/2 protocol (documentation) | https://nghttp2.org/
- Debian apt - nghttp2 - 1.64.0-1.1+deb13u1: normalized package name match | Debian stable package indexes: nghttp2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | server, proxy and client implementing HTTP/2 | https://nghttp2.org/
- Debian apt - nghttp2-client - 1.64.0-1.1+deb13u1: normalized package name match | Debian stable package indexes: nghttp2-client from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | client implementing HTTP/2 protocol | https://nghttp2.org/
- Debian apt - nghttp2-proxy - 1.64.0-1.1+deb13u1: normalized package name match | Debian stable package indexes: nghttp2-proxy from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | reverse proxy implementing HTTP/2 protocol | https://nghttp2.org/
- Debian apt - nghttp2-server - 1.64.0-1.1+deb13u1: normalized package name match | Debian stable package indexes: nghttp2-server from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | server implementing HTTP/2 protocol | https://nghttp2.org/
- Nix - nghttp2: normalized package name match | nixpkgs package indexes: pkgs/by-name/ng/nghttp2/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libnghttp2-14 - 1.59.0-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: libnghttp2-14 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | library implementing HTTP/2 protocol (shared library) | https://nghttp2.org/
- Ubuntu apt - libnghttp2-dev - 1.59.0-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: libnghttp2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | library implementing HTTP/2 protocol (development files) | https://nghttp2.org/
- Ubuntu apt - libnghttp2-doc - 1.59.0-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: libnghttp2-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | library implementing HTTP/2 protocol (documentation) | https://nghttp2.org/
- Ubuntu apt - nghttp2 - 1.59.0-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: nghttp2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | server, proxy and client implementing HTTP/2 | https://nghttp2.org/
- Ubuntu apt - nghttp2-client - 1.59.0-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: nghttp2-client from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | client implementing HTTP/2 protocol | https://nghttp2.org/
- Ubuntu apt - nghttp2-proxy - 1.59.0-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: nghttp2-proxy from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | reverse proxy implementing HTTP/2 protocol | https://nghttp2.org/
- Ubuntu apt - nghttp2-server - 1.59.0-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: nghttp2-server from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | server implementing HTTP/2 protocol | https://nghttp2.org/
- apk - nghttp2 - 1.70.0-r0: normalized package name match | Alpine Linux edge package indexes: nghttp2 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | HTTP/2 C client, server and proxy | https://nghttp2.org


## Combined YAML source

View the package source record on GitHub. [combined/nghttp2.yml](https://github.com/mxcl/pkgdb/blob/main/combined/nghttp2.yml)


## Sources

- 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
