# Install glib with Homebrew, apk, dnf, Nix, zypper

Core application library for C. Version 2.88.3 via Homebrew; verified 2026-08-02. Also installable with nix: nix profile install nixpkgs#glib.

## Install

```sh
sudo av install brew:glib
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install glib
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add glib
```

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

- dnf (92%):

```sh
sudo dnf install glib
```

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

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

- zypper (92%):

```sh
sudo zypper install libgio-2_0-0
```

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

## Package facts

- **Package key:** brew:glib
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/glib>
- **Version:** 2.88.3
- **Source summary:** Core application library for C
- **Homepage:** <https://docs.gtk.org/glib/>
- **Upstream docs:** <https://docs.gtk.org/glib/>
- **License:** LGPL-2.1-or-later
- **Source archive:** <https://download.gnome.org/sources/glib/2.88/glib-2.88.3.tar.xz>
- **Last updated:** 2026-08-02T22:58:43-04:00
- **Generated:** 2026-08-04T22:13:35+00:00

## Executables

- gapplication (cli)
- gdbus (cli)
- gdbus-codegen (cli)
- gi-compile-repository (cli)
- gi-decompile-typelib (cli)
- gi-inspect-typelib (cli)
- gio (cli)
- gio-querymodules (cli)
- glib-compile-resources (cli)
- glib-compile-schemas (cli)
- glib-genmarshal (cli)
- glib-gettextize (cli)
- glib-mkenums (cli)
- gobject-query (cli)
- gresource (cli)
- gsettings (cli)
- gtester (cli)
- gtester-report (cli)
- gapplication (alias)
- gdbus (alias)
- gdbus-codegen (alias)
- gi-compile-repository (alias)
- gi-decompile-typelib (alias)
- gi-inspect-typelib (alias)
- gio (alias)
- gio-querymodules (alias)
- glib-compile-resources (alias)
- glib-compile-schemas (alias)
- glib-genmarshal (alias)
- glib-gettextize (alias)
- glib-mkenums (alias)
- gobject-query (alias)
- gresource (alias)
- gsettings (alias)
- gtester (alias)
- gtester-report (alias)

## Dependencies

- gettext
- pcre2

## Build dependencies

- bison
- gettext
- meson
- ninja
- pkgconf
- python-setuptools
- python@3.14

## Uses from macOS

- libffi
- python

## 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-08-04
- Package-manager version: 2.88.3
- Package-manager updated: 2026-08-02
- Local data: ok
- Upstream repository: https://docs.gtk.org/glib/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

GLib is the low-level C foundation used by GTK and GNOME, providing portable data structures, strings, file utilities, process helpers, main-loop primitives, dynamic modules, object typing, I/O, IPC, networking, settings, and system integration APIs.

### Project history

GLib emerged as the shared utility layer beneath GTK-era C applications, and GNOME's release archive shows stable 1.2 releases in 1999 before the 2.0 line began in 2002. The 2.x API family established the long-lived GLib, GObject, GModule, and GIO split documented by GTK and GNOME.

Over time, GLib expanded from basic C convenience routines into a broad application substrate. GObject supplied an object and type system for C, GModule abstracted dynamic loading, and GIO added higher-level APIs for streaming I/O, files, D-Bus, networking, resources, settings, and application integration.

The project moved its source and issue workflow to GNOME's GitLab, while release archives remained available from GNOME download infrastructure. Its documentation moved to gi-docgen-generated API pages under docs.gtk.org, reflecting GLib's role as an introspection-friendly base library for language bindings.

### Adoption history

GLib's adoption followed GTK and GNOME but spread beyond graphical applications because it offered portable C building blocks without requiring a GUI. Projects use it for event loops, data containers, structured error handling, Unicode and string helpers, command-line option parsing, tests, and cross-platform runtime glue.

The library is a dependency root in Linux desktop stacks: installing GTK, GNOME services, GStreamer components, and many C libraries often brings GLib along. Its ABI stability and regular release train make it one of the packages that distribution maintainers track carefully during desktop, toolchain, and security updates.

### How it is used

Practitioners use GLib through headers such as `glib.h` and pkg-config modules such as `glib-2.0`. Application code commonly uses `GList`, `GHashTable`, `GError`, `GMainLoop`, `GOptionContext`, `GKeyFile`, and automatic cleanup helpers to write portable C with fewer platform-specific branches.

The Homebrew package also exposes developer utilities such as `glib-compile-resources`, `glib-compile-schemas`, `gdbus`, `gio`, `gsettings`, `glib-genmarshal`, and `glib-mkenums`. These tools generate resources, schemas, marshalling code, enum metadata, and D-Bus helpers used by GTK and GNOME-style applications.

### Why package nerds care

GLib is package-manager infrastructure by gravity: it is small enough to be a library dependency but central enough that ABI, introspection data, and helper binaries affect large parts of a desktop stack. Packagers care about its Meson build, gir data, schema/resource tools, and tight relationship with GTK release cycles.

Because GLib abstracts platform details while staying in C, it also acts as a compatibility layer between Unix-like systems, Windows ports, language bindings, and higher-level GNOME libraries.

### Timeline

- 1999: GLib 1.2.0 release archive published by GNOME.
- 2002: GLib 2.0.0 release archive published by GNOME.
- 2010s: GIO, D-Bus, settings, resources, and introspection workflows made GLib a broader application framework base.
- 2020s: gi-docgen API references and GitLab-hosted development became the normal documentation and contribution path.

### Related projects

- GLib underpins GTK and GNOME, and is closely related to GObject, GModule, GIO, GdkPixbuf, Pango, GStreamer, D-Bus, Meson, and GObject Introspection.

### Sources

- <https://docs.gtk.org/glib/>
- <https://download.gnome.org/sources/glib/>
- <https://gitlab.gnome.org/GNOME/glib>
- <https://www.gtk.org/docs/architecture/glib>


## 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:** glib
- **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

## Other Package-Manager Records

- Nix - glib: normalized package name match | nixpkgs package indexes: pkgs/by-name/gl/glib/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - glib - 2.88.2-r0: normalized package name match | Alpine Linux edge package indexes: glib from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low-level core library that forms the basis for projects such as GTK and GNOME | https://developer.gnome.org/glib/
- apk - glib-bash-completion - 2.88.2-r0: normalized package name match | Alpine Linux edge package indexes: glib-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Bash completions for glib | https://developer.gnome.org/glib/
- apk - glib-dbg - 2.88.2-r0: normalized package name match | Alpine Linux edge package indexes: glib-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low-level core library that forms the basis for projects such as GTK and GNOME (debug symbols) | https://developer.gnome.org/glib/
- apk - glib-dev - 2.88.2-r0: normalized package name match | Alpine Linux edge package indexes: glib-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low-level core library that forms the basis for projects such as GTK and GNOME (development files) | https://developer.gnome.org/glib/
- apk - glib-doc - 2.88.2-r0: normalized package name match | Alpine Linux edge package indexes: glib-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low-level core library that forms the basis for projects such as GTK and GNOME (documentation) | https://developer.gnome.org/glib/
- apk - glib-lang - 2.88.2-r0: normalized package name match | Alpine Linux edge package indexes: glib-lang from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Languages for package glib | https://developer.gnome.org/glib/
- apk - glib-static - 2.88.2-r0: normalized package name match | Alpine Linux edge package indexes: glib-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low-level core library that forms the basis for projects such as GTK and GNOME (static library) | https://developer.gnome.org/glib/
- dnf - glib - 1.2.10-78.fc45: normalized package name match | Fedora Rawhide package metadata: glib from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A library of handy utility functions | http://www.gtk.org/
- dnf - glib-devel - 1.2.10-78.fc45: normalized package name match | Fedora Rawhide package metadata: glib-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Libraries and header files for glib development | http://www.gtk.org/
- zypper - libgio-2_0-0 - 2.88.3-1.1: installed executable or alias match | openSUSE Tumbleweed package metadata: libgio-2_0-0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A virtual file system library API | https://gitlab.gnome.org/GNOME/glib/


## Related links

- [Terminal utility packages](https://pkg.so/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [pcre2](https://pkg.so/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [gettext](https://pkg.so/brew/gettext/) - Runtime dependency declared by Homebrew.
- [python@3.14](https://pkg.so/brew/python-3-14/) - Build dependency declared by Homebrew.
- [pkgconf](https://pkg.so/brew/pkgconf/) - Build dependency declared by Homebrew.
- [ninja](https://pkg.so/brew/ninja/) - Build dependency declared by Homebrew.
- [harfbuzz](https://pkg.so/brew/harfbuzz/) - Popular package that depends on this formula.
- [pango](https://pkg.so/brew/pango/) - Popular package that depends on this formula.
- [cairo](https://pkg.so/brew/cairo/) - Popular package that depends on this formula.
- [poppler](https://pkg.so/brew/poppler/) - Popular package that depends on this formula.
- [tesseract](https://pkg.so/brew/tesseract/) - Popular package that depends on this formula.
- [gdk-pixbuf](https://pkg.so/brew/gdk-pixbuf/) - Popular package that depends on this formula.
- [librsvg](https://pkg.so/brew/librsvg/) - Popular package that depends on this formula.
- [graphviz](https://pkg.so/brew/graphviz/) - Popular package that depends on this formula.
- [json-glib](https://pkg.so/brew/json-glib/) - Shares pkgdb curated category or tags: c, cli, developer-tools, gnome, library.
- [vte3](https://pkg.so/brew/vte3/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, gtk, library.
- [gspell](https://pkg.so/brew/gspell/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, gtk, library.
- [gtk-doc](https://pkg.so/brew/gtk-doc/) - Shares pkgdb curated category or tags: c, cli, developer-tools, gnome, gtk.
- [libdazzle](https://pkg.so/brew/libdazzle/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, gtk, library.
- [libdeflate](https://pkg.so/brew/libdeflate/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [libdatrie](https://pkg.so/brew/libdatrie/) - Shares pkgdb curated category or tags: c, cli, developer-tools, library.
- [gtk+3](https://pkg.so/brew/gtk-3/) - Local package facts share a topical domain. Shared terms: cli, core, developer, developer-tools, gettext.

## Combined YAML source

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


## Sources

- 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
