# Install cairo with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Vector graphics library with cross-device output support. Version 1.18.4 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:cairo
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cairo
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cairo
```

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

### Linux

- apk (92%):

```sh
sudo apk add cairo
```

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

- Debian apt (92%):

```sh
sudo apt install libcairo-gobject2
```

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

- dnf (92%):

```sh
sudo dnf install cairo
```

  Evidence: Fedora Rawhide package metadata: cairo from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#cairo
```

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

- pacman (92%):

```sh
sudo pacman -S cairo
```

  Evidence: Arch Linux sync databases: cairo from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install cairo-devel
```

  Evidence: openSUSE Tumbleweed package metadata: cairo-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:cairo
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cairo>
- **Version:** 1.18.4
- **Source summary:** Vector graphics library with cross-device output support
- **Homepage:** <https://cairographics.org/>
- **Repository:** <https://gitlab.freedesktop.org/cairo/cairo>
- **Upstream docs:** <https://www.cairographics.org/documentation>
- **License:** LGPL-2.1-only OR MPL-1.1
- **Source archive:** <https://cairographics.org/releases/cairo-1.18.4.tar.xz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cairo-trace (cli)
- cairo-trace (alias)

## Dependencies

- fontconfig
- freetype
- gettext
- glib
- libpng
- libx11
- libxcb
- libxext
- libxrender
- lzo
- pixman

## Build dependencies

- meson
- ninja
- pkgconf

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.18.4
- Local data: ok
- Upstream repository: https://cairographics.org/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Cairo is a C 2D graphics library that provides a PostScript/PDF-like drawing API over multiple output backends, including X11, XCB, Quartz, Win32, image buffers, PDF, PostScript, and SVG.

### Project history

The official repository README says cairo was originally developed by Carl Worth and Keith Packard. Cairo's early identity was a cross-device vector rendering library: the documentation archive points to a 2003 paper under the earlier Xr name and later cairo presentations from 2005.

The 1.0.0 release announcement on 2005-08-24 marked the stable API/ABI line for 1.x.y releases. At that point xlib, image, and win32 were supported backends, while Glitz, PostScript, PDF, Quartz, and XCB were experimental. Modern project documentation lists a wider set of supported targets, including PDF, PostScript, SVG, Quartz, Win32, Xlib, and XCB.

Cairo is tied closely to pixman for pixel compositing and to desktop text/rendering stacks through fontconfig, FreeType, platform font backends, and toolkit bindings. The project continues to publish releases through cairographics.org, with the official news page listing releases up to 1.18.4 in 2025.

### Adoption history

Cairo became infrastructure rather than an end-user app. The official bindings page lists bindings for languages including C++, Haskell, Java, Perl, PHP, Python, Ruby, and others, and notes toolkit integration such as GTK+ 2.8+ support. That binding and toolkit spread made cairo a common dependency in Linux desktop, document, plotting, and image-generation software.

Package-manager adoption is broad: the input facts list Cairo across Homebrew, Debian/Ubuntu, Fedora, Alpine, Arch, MacPorts, Nix, and openSUSE-style packaging. That breadth reflects cairo's role as a shared graphics primitive for higher-level applications.

### How it is used

Developers use cairo to draw vector graphics, text, paths, patterns, and transformed/composited images to screen and file surfaces. Common package builds enable image, PNG, PDF, PostScript, SVG, Xlib, XCB, FreeType, fontconfig, Quartz, or Windows backends depending on platform needs.

The Homebrew package exposes cairo-trace, but most users consume cairo as a library dependency through headers, pkg-config metadata, and language bindings.

### Why package nerds care

Cairo is one of those packages that explains why dependency graphs get deep: a small API surface at the application level hides years of rendering, font, backend, and platform compatibility work. For package nerds it is a foundational desktop graphics dependency, sitting between low-level raster compositing in pixman and higher-level toolkits, browsers, plotting libraries, and document renderers.

Its dual LGPL/MPL licensing, stable 1.x compatibility promise, backend matrix, and language bindings made it unusually reusable across open-source desktop stacks and proprietary-friendly distribution scenarios.

### Timeline

- 2003: Xr-era cross-device vector rendering work precedes the cairo name.
- 2005: cairo 1.0.0 released with a stable 1.x compatibility promise.
- 2008: cairo 1.8.0 release appears in the official news archive.
- 2018: cairo 1.16.0 released.
- 2023: cairo 1.18.0 released.
- 2025: cairo 1.18.4 released.

### Related projects

- pixman is the pixel-manipulation library used by cairo for image compositing.
- Language bindings and adjacent projects include pycairo, cairomm, rcairo, cairo-perl, cairo-ocaml, and cairocffi.
- GTK and other GUI toolkits use cairo as a drawing layer; cairo also targets document formats such as PDF, PostScript, and SVG.

### Sources

- <https://gitlab.freedesktop.org/cairo/cairo/-/blob/master/README.md>
- <https://www.cairographics.org/>
- <https://www.cairographics.org/bindings/>
- <https://www.cairographics.org/documentation/>
- <https://www.cairographics.org/news/>
- <https://www.cairographics.org/news/cairo-1.0.0/>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - libcairo-gobject2 - 1.18.4-1+b1: normalized package name match | Debian stable package indexes: libcairo-gobject2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Cairo 2D vector graphics library (GObject library) | https://cairographics.org/
- Debian apt - libcairo-script-interpreter2 - 1.18.4-1+b1: normalized package name match | Debian stable package indexes: libcairo-script-interpreter2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Cairo 2D vector graphics library (script interpreter) | https://cairographics.org/
- Debian apt - libcairo2 - 1.18.4-1+b1: normalized package name match | Debian stable package indexes: libcairo2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Cairo 2D vector graphics library | https://cairographics.org/
- Debian apt - libcairo2-dev - 1.18.4-1+b1: normalized package name match | Debian stable package indexes: libcairo2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for the Cairo 2D graphics library | https://cairographics.org/
- Debian apt - libcairo2-doc - 1.18.4-1: normalized package name match | Debian stable package indexes: libcairo2-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Documentation for the Cairo Multi-platform 2D graphics library | https://cairographics.org/
- Nix - cairo: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cairo/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libcairo-gobject2 - 1.18.0-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcairo-gobject2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Cairo 2D vector graphics library (GObject library) | https://cairographics.org/
- Ubuntu apt - libcairo-script-interpreter2 - 1.18.0-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcairo-script-interpreter2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Cairo 2D vector graphics library (script interpreter) | https://cairographics.org/
- Ubuntu apt - libcairo2 - 1.18.0-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcairo2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Cairo 2D vector graphics library | https://cairographics.org/
- Ubuntu apt - libcairo2-dev - 1.18.0-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcairo2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Development files for the Cairo 2D graphics library | https://cairographics.org/
- Ubuntu apt - libcairo2-doc - 1.18.0-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcairo2-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Documentation for the Cairo Multi-platform 2D graphics library | https://cairographics.org/
- apk - cairo - 1.18.4-r1: normalized package name match | Alpine Linux edge package indexes: cairo from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A vector graphics library | https://cairographics.org/
- apk - cairo-dbg - 1.18.4-r1: normalized package name match | Alpine Linux edge package indexes: cairo-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A vector graphics library (debug symbols) | https://cairographics.org/
- apk - cairo-dev - 1.18.4-r1: normalized package name match | Alpine Linux edge package indexes: cairo-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A vector graphics library (development files) | https://cairographics.org/
- apk - cairo-doc - 1.18.4-r1: normalized package name match | Alpine Linux edge package indexes: cairo-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A vector graphics library (documentation) | https://cairographics.org/
- apk - cairo-gobject - 1.18.4-r1: normalized package name match | Alpine Linux edge package indexes: cairo-gobject from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A vector graphics library (gobject bindings) | https://cairographics.org/


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Media and graphics packages](https://www.automicvault.com/pkg/media-graphics-tools/) - Matched media, image, audio, video, or graphics metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [fontconfig](https://www.automicvault.com/pkg/brew/fontconfig/) - Runtime dependency declared by Homebrew.
- [freetype](https://www.automicvault.com/pkg/brew/freetype/) - Runtime dependency declared by Homebrew.
- [gettext](https://www.automicvault.com/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [glib](https://www.automicvault.com/pkg/brew/glib/) - Runtime dependency declared by Homebrew.
- [libpng](https://www.automicvault.com/pkg/brew/libpng/) - Runtime dependency declared by Homebrew.
- [meson](https://www.automicvault.com/pkg/brew/meson/) - Build dependency declared by Homebrew.
- [ninja](https://www.automicvault.com/pkg/brew/ninja/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [astrometry-net](https://www.automicvault.com/pkg/brew/astrometry-net/) - Popular package that depends on this formula.
- [baobab](https://www.automicvault.com/pkg/brew/baobab/) - Popular package that depends on this formula.
- [chafa](https://www.automicvault.com/pkg/brew/chafa/) - Popular package that depends on this formula.
- [cherrytree](https://www.automicvault.com/pkg/brew/cherrytree/) - Popular package that depends on this formula.
- [claws-mail](https://www.automicvault.com/pkg/brew/claws-mail/) - Popular package that depends on this formula.
- [svg2pdf](https://www.automicvault.com/pkg/brew/svg2pdf/) - Shares the same upstream homepage.
- [libart](https://www.automicvault.com/pkg/brew/libart/) - Shares av.db curated category or tags: 2d-graphics, cli, media, rendering, vector-graphics.
- [librsvg](https://www.automicvault.com/pkg/brew/librsvg/) - Shares av.db curated category or tags: cli, graphics-library, media, rendering, svg.
- [potrace](https://www.automicvault.com/pkg/brew/potrace/) - Shares av.db curated category or tags: cli, media, pdf, svg, vector-graphics.
- [pdf2svg](https://www.automicvault.com/pkg/brew/pdf2svg/) - Shares av.db curated category or tags: cli, media, pdf, svg.
- [plotutils](https://www.automicvault.com/pkg/brew/plotutils/) - Shares av.db curated category or tags: cli, graphics-library, media, vector-graphics.
- [poppler](https://www.automicvault.com/pkg/brew/poppler/) - Shares av.db curated category or tags: cli, media, pdf, rendering.
- [pstoedit](https://www.automicvault.com/pkg/brew/pstoedit/) - Shares av.db curated category or tags: cli, media, pdf, vector-graphics.
- [scour](https://www.automicvault.com/pkg/brew/scour/) - Shares av.db curated category or tags: cli, media, svg, vector-graphics.

## Combined YAML source

View the package source record on GitHub. [combined/cairo.yml](https://github.com/automic-vault/db/blob/main/combined/cairo.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
