Automic VaultAutomic Vault

brew

使用 Homebrew, apk, dnf, Nix, zypper 安装 glib

查看 glib 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install glib

local Homebrew formula metadata

Linux

Alpine Linux apk已验证 · 92%
sudo apk add glib

Alpine Linux edge package indexes · glib · 来源: dl-cdn.alpinelinux.org

Fedora dnf已验证 · 92%
sudo dnf install glib

Fedora Rawhide package metadata · glib · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#glib

nixpkgs package indexes · pkgs/by-name/gl/glib/package.nix · 来源: api.github.com

openSUSE zypper已验证 · 92%
sudo zypper install libgio-2_0-0

openSUSE Tumbleweed package metadata · libgio-2_0-0 · 来源: download.opensuse.org

概览

软件包摘要

Core application library for C

命令和别名

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

历史

项目历史与用法

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.

时间线

  • 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.

安全态势

风险级别:绿色

library-like package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • library-like package without higher-risk signals

信号

  • metadata:library-like

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 2 个运行时依赖。
  • 构建元数据列出 7 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
gapplicationcli全局可执行文件
gdbuscli全局可执行文件
gdbus-codegencli全局可执行文件
gi-compile-repositorycli全局可执行文件
gi-decompile-typelibcli全局可执行文件
gi-inspect-typelibcli全局可执行文件
giocli全局可执行文件
gio-querymodulescli全局可执行文件
glib-compile-resourcescli全局可执行文件
glib-compile-schemascli全局可执行文件
glib-genmarshalcli全局可执行文件
glib-gettextizecli全局可执行文件
glib-mkenumscli全局可执行文件
gobject-querycli全局可执行文件
gresourcecli全局可执行文件
gsettingscli全局可执行文件
gtestercli全局可执行文件
gtester-reportcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本2.88.2
管理器更新时间2026-06-27
本地数据OK
上游not checked
检测到的最新版本未检测到

https://docs.gtk.org/glib/

安装元数据

软件包元数据

软件包键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
Pulseupdated
依赖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 DatabaseHomebrew formula API
Taphomebrew/core
Full Nameglib
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

glib

nix profile install nixpkgs#glib
  • normalized package name match
  • 匹配方式:Glib
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/gl/glib/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
apk95%

glib 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 glib
  • License: LGPL-2.1-or-later
  • Architecture: x86_64
  • Source Package: glib
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Glib
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: glib from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

glib-bash-completion 2.88.1-r2

Bash completions for glib

https://developer.gnome.org/glib/

sudo apk add glib-bash-completion
  • License: LGPL-2.1-or-later
  • Architecture: x86_64
  • Source Package: glib
  • normalized package name match
  • 匹配方式:Glib
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: glib-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

glib-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-dbg
  • License: LGPL-2.1-or-later
  • Architecture: x86_64
  • Source Package: glib
  • 1 依赖
  • normalized package name match
  • 匹配方式:Glib
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: glib-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

glib-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-dev
  • License: LGPL-2.1-or-later
  • Architecture: x86_64
  • Source Package: glib
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Glib
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: glib-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

glib-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-doc
  • License: LGPL-2.1-or-later
  • Architecture: x86_64
  • Source Package: glib
  • normalized package name match
  • 匹配方式:Glib
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: glib-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

glib-lang 2.88.1-r2

Languages for package glib

https://developer.gnome.org/glib/

sudo apk add glib-lang
  • License: LGPL-2.1-or-later
  • Architecture: x86_64
  • Source Package: glib
  • normalized package name match
  • 匹配方式:Glib
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: glib-lang from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

glib-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-static
  • License: LGPL-2.1-or-later
  • Architecture: x86_64
  • Source Package: glib
  • 1 依赖
  • normalized package name match
  • 匹配方式:Glib
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: glib-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
dnf95%

glib 1.2.10-77.fc44

A library of handy utility functions

http://www.gtk.org/

sudo dnf install glib
  • License: LGPL-2.0-or-later
  • Category: Unspecified
  • Architecture: i686
  • Source Package: glib
  • 2 依赖
  • 4 提供
  • normalized package name match
  • 匹配方式:Glib
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: glib from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

glib-devel 1.2.10-77.fc44

Libraries and header files for glib development

http://www.gtk.org/

sudo dnf install glib-devel
  • License: LGPL-2.0-or-later
  • Category: Unspecified
  • Architecture: i686
  • Source Package: glib
  • 7 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Glib
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: glib-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
zypper92%

libgio-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
  • License: LGPL-2.1-or-later
  • Category: System/Libraries
  • Architecture: x86_64
  • Source Package: glib2
  • 12 依赖
  • 3 提供
  • installed executable or alias match
  • 匹配方式:Gio
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: libgio-2_0-0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

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