macOS
brew install gliblocal Homebrew formula metadata
安装
brew install gliblocal Homebrew formula metadata
sudo apk add glibAlpine Linux edge package indexes · glib · 来源: dl-cdn.alpinelinux.org
sudo dnf install glibFedora Rawhide package metadata · glib · 来源: dl.fedoraproject.org
nix profile install nixpkgs#glibnixpkgs package indexes · pkgs/by-name/gl/glib/package.nix · 来源: api.github.com
sudo zypper install libgio-2_0-0openSUSE Tumbleweed package metadata · libgio-2_0-0 · 来源: download.opensuse.org
概览
Core application library for C
历史
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.
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.
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.
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.
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.
安全态势
library-like package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
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 | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:glib |
|---|---|
| 版本 | 2.88.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/glib |
| 主页 | https://docs.gtk.org/glib/ |
| 仓库 | https://gitlab.gnome.org/GNOME/glib |
| 上游文档 | https://docs.gtk.org/glib |
| 许可证 | LGPL-2.1-or-later |
| 源码归档 | https://download.gnome.org/sources/glib/2.88/glib-2.88.2.tar.xz |
| 最后更新 | 2026-06-27T11:06:01-04:00 |
| Pulse | updated |
| 依赖 | gettext, pcre2 |
| 构建依赖 | bison, gettext, meson, ninja, pkgconf, python-setuptools, python@3.14 |
| macOS 提供的库 | libffi, python |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
glib
nix profile install nixpkgs#glibglib 2.88.1-r2
Low-level core library that forms the basis for projects such as GTK and GNOME
https://developer.gnome.org/glib/
sudo apk add glibglib-bash-completion 2.88.1-r2
Bash completions for glib
https://developer.gnome.org/glib/
sudo apk add glib-bash-completionglib-dbg 2.88.1-r2
Low-level core library that forms the basis for projects such as GTK and GNOME (debug symbols)
https://developer.gnome.org/glib/
sudo apk add glib-dbgglib-dev 2.88.1-r2
Low-level core library that forms the basis for projects such as GTK and GNOME (development files)
https://developer.gnome.org/glib/
sudo apk add glib-devglib-doc 2.88.1-r2
Low-level core library that forms the basis for projects such as GTK and GNOME (documentation)
https://developer.gnome.org/glib/
sudo apk add glib-docglib-lang 2.88.1-r2
Languages for package glib
https://developer.gnome.org/glib/
sudo apk add glib-langglib-static 2.88.1-r2
Low-level core library that forms the basis for projects such as GTK and GNOME (static library)
https://developer.gnome.org/glib/
sudo apk add glib-staticglib 1.2.10-77.fc44
A library of handy utility functions
sudo dnf install glibglib-devel 1.2.10-77.fc44
Libraries and header files for glib development
sudo dnf install glib-devellibgio-2_0-0 2.88.1-1.1
A virtual file system library API
https://gitlab.gnome.org/GNOME/glib/
sudo zypper install libgio-2_0-0来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.