# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, zypper, apt 安装 glew

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

## 安装

```sh
sudo av install brew:glew
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install glew
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install glew
```

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

### Linux

- apk (92%):

```sh
sudo apk add glew
```

  证据: Alpine Linux edge package indexes: glew from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install glew
```

  证据: Fedora Rawhide package metadata: glew 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#glew
```

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

- pacman (92%):

```sh
sudo pacman -S glew
```

  证据: Arch Linux sync databases: glew from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install glew
```

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

- Debian apt (92%):

```sh
sudo apt install glew-utils
```

  证据: Debian stable package indexes: glew-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## 软件包事实

- **软件包键:** brew:glew
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/glew>
- **版本:** 2.3.1
- **来源摘要:** OpenGL Extension Wrangler Library
- **主页:** <https://glew.sourceforge.net/>
- **仓库:** <https://github.com/nigels-com/glew>
- **上游文档:** <https://glew.sourceforge.net/>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://downloads.sourceforge.net/project/glew/glew/2.3.1/glew-2.3.1.tgz>
- **最后更新:** 2026-08-02T20:52:07+09:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- glewinfo (cli)
- visualinfo (cli)
- glewinfo (别名)
- visualinfo (别名)

## 构建依赖

- cmake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.3.1
- 管理器更新时间: 2026-08-02
- 本地数据: OK
- 上游仓库: https://glew.sourceforge.net/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

GLEW, the OpenGL Extension Wrangler Library, is a C and C++ extension-loading library that discovers OpenGL, WGL, GLX, and EGL capabilities at runtime. It became a standard packaging target because OpenGL applications often need the same generated headers, library, and inspection tools across operating systems.

### 项目历史

GLEW's copyright history names Milan Ikits, Marcelo E. Magallon, and Lev Povalahev in the early 2000s, and the project site records a long release line beginning before the 1.2.5 release in December 2004. The project later moved through SourceForge and GitHub, while continuing to distribute generated release snapshots.

The 1.x series tracked OpenGL 2.x, 3.x, and 4.x extension growth. GLEW 2.0 in 2016 added forward-compatible-context support plus OSMesa and EGL support, and GLEW 2.1 in 2017 added support for OpenGL 4.6.

### 采用历史

GLEW's project news records inclusion in the OpenGL SDK and NVIDIA OpenGL SDK in 2007, an important adoption signal for an extension loader. The library's stability, permissive license, and simple include-and-initialize workflow helped it become a default dependency for tutorials, examples, and desktop OpenGL applications.

Package managers usually ship both the library and the `glewinfo` and `visualinfo` utilities. That turns GLEW from a build dependency into a diagnostics package for graphics stacks, useful when comparing driver extension exposure across Linux, macOS, Windows, BSD, and Mesa-based systems.

### 使用方式

Practitioners include `GL/glew.h`, create a valid OpenGL context, call `glewInit()`, and then test extension or version variables before using optional API entry points. `glewinfo` verifies extension entry points, while `visualinfo` reports visuals or pixel formats.

Developers who need new extension data can regenerate sources with the project's generation workflow, but the README recommends packaged release snapshots for most users.

### 为什么软件包爱好者会关心

GLEW matters to package maintainers because it smooths over a historically awkward boundary between graphics drivers, OpenGL headers, generated loaders, and application build systems. A distro-provided GLEW package lets many older and portable OpenGL projects avoid vendoring generated extension code.

### 时间线

- 2004: GLEW 1.2.5 released with new extensions and FreeBSD support.
- 2007: GLEW included in the OpenGL SDK and NVIDIA OpenGL SDK.
- 2016: GLEW 2.0 added forward-compatible contexts, OSMesa, and EGL support.
- 2017: GLEW 2.1 added OpenGL 4.6 support.

### Related projects

- GLEW sits alongside OpenGL, Mesa, GLX, WGL, EGL, GLUT/freeglut, and SDK sample code that needs portable access to extension entry points.

### 来源

- <https://github.com/nigels-com/glew>
- <https://glew.sourceforge.net/>
- <https://glew.sourceforge.net/basic.html>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** glew
- **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

## 其他软件包管理器记录

- Debian apt - glew-utils - 2.2.0-4+b2: normalized package name match | Debian stable package indexes: glew-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenGL Extension Wrangler - utilities | http://glew.sourceforge.net
- Debian apt - libglew-dev - 2.2.0-4+b2: normalized package name match | Debian stable package indexes: libglew-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenGL Extension Wrangler - development environment | http://glew.sourceforge.net
- Debian apt - libglew2.2 - 2.2.0-4+b2: normalized package name match | Debian stable package indexes: libglew2.2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenGL Extension Wrangler - runtime environment | http://glew.sourceforge.net
- Nix - glew: normalized package name match | nixpkgs package indexes: pkgs/by-name/gl/glew/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - glew-utils - 2.2.0-4build1: normalized package name match | Ubuntu 24.04 LTS package indexes: glew-utils from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenGL Extension Wrangler - utilities | http://glew.sourceforge.net
- Ubuntu apt - libglew-dev - 2.2.0-4build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libglew-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenGL Extension Wrangler - development environment | http://glew.sourceforge.net
- Ubuntu apt - libglew2.2 - 2.2.0-4build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libglew2.2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenGL Extension Wrangler - runtime environment | http://glew.sourceforge.net
- apk - glew - 2.3.1-r0: normalized package name match | Alpine Linux edge package indexes: glew from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A cross-platform C/C++ extension loading library | https://glew.sourceforge.net/
- apk - glew-dev - 2.3.1-r0: normalized package name match | Alpine Linux edge package indexes: glew-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A cross-platform C/C++ extension loading library (development files) | https://glew.sourceforge.net/
- apk - glew-tools - 2.3.1-r0: normalized package name match | Alpine Linux edge package indexes: glew-tools from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A cross-platform C/C++ extension loading library (tools) | https://glew.sourceforge.net/
- dnf - glew - 2.2.0-13.fc45: normalized package name match | Fedora Rawhide package metadata: glew from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | The OpenGL Extension Wrangler Library | https://github.com/nigels-com/glew
- dnf - glew-devel - 2.2.0-13.fc45: normalized package name match | Fedora Rawhide package metadata: glew-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Development files for glew | https://github.com/nigels-com/glew
- dnf - libGLEW - 2.2.0-13.fc45: normalized package name match | Fedora Rawhide package metadata: libGLEW from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | libGLEW | https://github.com/nigels-com/glew
- pacman - glew - 2.3.1-1: normalized package name match | Arch Linux sync databases: glew from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The OpenGL Extension Wrangler Library | https://github.com/nigels-com/glew
- zypper - glew - 2.3.1-1.4: normalized package name match | openSUSE Tumbleweed package metadata: glew from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | OpenGL Extension Wrangler Library | https://github.com/nigels-com/glew
- zypper - glew-devel - 2.3.1-1.4: normalized package name match | openSUSE Tumbleweed package metadata: glew-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for glew | https://github.com/nigels-com/glew


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Media and graphics packages](https://pkg.so/zh-hans/media-graphics-tools/) - Matched media, image, audio, video, or graphics metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [opencv](https://pkg.so/zh-hans/brew/opencv/) - Popular package that depends on this formula.
- [colmap](https://pkg.so/zh-hans/brew/colmap/) - Popular package that depends on this formula.
- [gource](https://pkg.so/zh-hans/brew/gource/) - Popular package that depends on this formula.
- [pcl](https://pkg.so/zh-hans/brew/pcl/) - Popular package that depends on this formula.
- [pymol](https://pkg.so/zh-hans/brew/pymol/) - Popular package that depends on this formula.
- [vice](https://pkg.so/zh-hans/brew/vice/) - Popular package that depends on this formula.
- [rtabmap](https://pkg.so/zh-hans/brew/rtabmap/) - Popular package that depends on this formula.
- [visp](https://pkg.so/zh-hans/brew/visp/) - Popular package that depends on this formula.
- [glbinding](https://pkg.so/zh-hans/brew/glbinding/) - Shares pkgdb curated category or tags: c-plus-plus, cli, graphics, media, opengl.
- [gd](https://pkg.so/zh-hans/brew/gd/) - Shares pkgdb curated category or tags: c, cli, graphics, media.
- [assimp](https://pkg.so/zh-hans/brew/assimp/) - Shares pkgdb curated category or tags: c-plus-plus, cli, graphics, media.
- [imlib2](https://pkg.so/zh-hans/brew/imlib2/) - Shares pkgdb curated category or tags: c, cli, graphics, media.
- [draco](https://pkg.so/zh-hans/brew/draco/) - Shares pkgdb curated category or tags: c-plus-plus, cli, graphics, media.
- [mp4v2](https://pkg.so/zh-hans/brew/mp4v2/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, media.
- [coin3d](https://pkg.so/zh-hans/brew/coin3d/) - Shares pkgdb curated category or tags: c-plus-plus, cli, graphics, media, opengl.
- [exact-image](https://pkg.so/zh-hans/brew/exact-image/) - Shares pkgdb curated category or tags: c-plus-plus, cli, graphics, media.

## Combined YAML source

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


## 来源

- 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
