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

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

## 安装

```sh
sudo av install brew:glpk
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install glpk
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install glpk
```

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

### Linux

- apk (92%):

```sh
sudo apk add glpk
```

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

- dnf (92%):

```sh
sudo dnf install glpk
```

  证据: Fedora Rawhide package metadata: glpk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#glpk
```

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

- pacman (92%):

```sh
sudo pacman -S glpk
```

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

- zypper (92%):

```sh
sudo zypper install glpk
```

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

- Debian apt (92%):

```sh
sudo apt install glpk-doc
```

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

### Windows

- Chocolatey (92%):

```sh
choco install glpk
```

  证据: Chocolatey community package catalog: glpk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='10.804','zoxide'

## 软件包事实

- **软件包键:** brew:glpk
- **软件包管理器:** Homebrew
- **版本:** 5.0
- **来源摘要:** Library for Linear and Mixed-Integer Programming
- **主页:** <https://www.gnu.org/software/glpk/>
- **最后更新:** 2026-06-19T12:31:20-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- glpsol (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 5.0
## 项目历史与用法

GLPK, the GNU Linear Programming Kit, is a GNU Project library and solver suite for large-scale linear programming, mixed-integer programming, and related optimization problems.

### 项目历史

The GNU FTP archive shows GLPK tarballs dating back to the 1.x line in 2000 and rapid 2.x and 3.x releases in 2001 and 2002. The 5.0 source package identifies GLPK as part of the GNU Project and describes it as ANSI C routines organized as a callable library.

GLPK evolved around a small but durable solver toolkit: primal simplex, dual simplex, exact rational simplex, primal-dual interior point, branch-and-cut, an API, the GNU MathProg modeling language, and the glpsol standalone solver. The 5.0 NEWS file records a long release history through the 4.x series before the 5.0 release in 2020.

### 采用历史

GLPK's adoption is strongest in academic, operations-research, reproducible-build, and scripting settings where a GPL solver can be installed from ordinary system package managers. Homebrew, Debian and Ubuntu package names, MacPorts, Nix, Pacman, Chocolatey, and other package-manager records show broad distribution.

### 使用方式

Practitioners use GLPK as a C library from applications or through glpsol for command-line solving. Typical inputs include MathProg models, LP files, MPS files, and mixed-integer models, with outputs used for teaching, prototyping, batch optimization jobs, and integration tests for modeling layers.

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

GLPK is important to package maintainers because it gives a complete optimization stack as portable C source plus a CLI solver. It is often the default free solver dependency that higher-level modeling tools can detect before users install commercial or heavier open-source solvers.

### 时间线

- 2000: glpk-1.1.1 appeared in the old GNU FTP archive.
- 2001: GLPK 2.x and 3.0 tarballs appeared in the old GNU FTP archive.
- 2017: GLPK 4.61 added support for building a re-entrant package for multithreaded environments.
- 2018: GLPK 4.65 added LP/MIP preprocessing API routines and cover-cut work.
- 2020: GLPK 5.0 was released and copyright was transferred to the Free Software Foundation.

### Related projects

- GLPK is related to GNU MathProg, AMPL-style model files, MPS and CPLEX LP interchange formats, and higher-level optimization packages that call external LP/MIP solvers.

### 来源

- <https://cvs.savannah.gnu.org/viewvc/glpk>
- <https://formulae.brew.sh/formula/glpk>
- <https://ftp.gnu.org/gnu/glpk/>
- <https://ftp.gnu.org/old-gnu/glpk/>
- <https://www.gnu.org/software/glpk>


## 安全说明

library-like package without higher-risk signals.

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

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

- Debian apt - glpk-doc - 5.0-1: normalized package name match | Debian stable package indexes: glpk-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | linear programming kit - documentation files | https://www.gnu.org/software/glpk/glpk.html
- Debian apt - glpk-utils - 5.0-1+b2: normalized package name match | Debian stable package indexes: glpk-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | linear programming kit - utility files | https://www.gnu.org/software/glpk/glpk.html
- Debian apt - libglpk-dev - 5.0-1+b2: normalized package name match | Debian stable package indexes: libglpk-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | linear programming kit - development files | https://www.gnu.org/software/glpk/glpk.html
- Debian apt - libglpk40 - 5.0-1+b2: normalized package name match | Debian stable package indexes: libglpk40 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | linear programming kit with integer (MIP) support | https://www.gnu.org/software/glpk/glpk.html
- Nix - glpk: normalized package name match | nixpkgs package indexes: pkgs/by-name/gl/glpk/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - glpk-doc - 5.0-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: glpk-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | linear programming kit - documentation files | https://www.gnu.org/software/glpk/glpk.html
- Ubuntu apt - glpk-utils - 5.0-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: glpk-utils from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | linear programming kit - utility files | https://www.gnu.org/software/glpk/glpk.html
- Ubuntu apt - libglpk-dev - 5.0-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libglpk-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | linear programming kit - development files | https://www.gnu.org/software/glpk/glpk.html
- Ubuntu apt - libglpk40 - 5.0-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libglpk40 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | linear programming kit with integer (MIP) support | https://www.gnu.org/software/glpk/glpk.html
- apk - glpk - 5.0-r3: normalized package name match | Alpine Linux edge package indexes: glpk from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | GLPK: For solving linear and mixed integer programming and other problems | https://www.gnu.org/software/glpk/
- apk - glpk-dev - 5.0-r3: normalized package name match | Alpine Linux edge package indexes: glpk-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | GLPK: For solving linear and mixed integer programming and other problems (development files) | https://www.gnu.org/software/glpk/
- dnf - glpk - 5.0-17.fc45: normalized package name match | Fedora Rawhide package metadata: glpk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | GNU Linear Programming Kit | https://www.gnu.org/software/glpk/
- dnf - glpk-devel - 5.0-17.fc45: normalized package name match | Fedora Rawhide package metadata: glpk-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development headers and files for GLPK | https://www.gnu.org/software/glpk/
- dnf - glpk-doc - 5.0-17.fc45: normalized package name match | Fedora Rawhide package metadata: glpk-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Documentation for glpk | https://www.gnu.org/software/glpk/
- dnf - glpk-utils - 5.0-17.fc45: normalized package name match | Fedora Rawhide package metadata: glpk-utils from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | GLPK-related utilities and examples | https://www.gnu.org/software/glpk/
- pacman - glpk - 5.0-3: normalized package name match | Arch Linux sync databases: glpk from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | GNU Linear Programming Kit: solve LP, MIP and other problems | https://www.gnu.org/software/glpk/glpk.html


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
