# Install glpk with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper

Library for Linear and Mixed-Integer Programming. Version 5.0 via Homebrew; verified 2026-06-19.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install glpk
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install glpk
```

  Evidence: 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
```

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

- Debian apt (92%):

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

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

- dnf (92%):

```sh
sudo dnf install glpk
```

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

- Nix (92%):

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

  Evidence: 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
```

  Evidence: 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
```

  Evidence: openSUSE Tumbleweed package metadata: glpk from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install glpk
```

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

## Package facts

- **Package key:** brew:glpk
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/glpk>
- **Version:** 5.0
- **Source summary:** Library for Linear and Mixed-Integer Programming
- **Homepage:** <https://www.gnu.org/software/glpk/>
- **Upstream docs:** <https://www.gnu.org/software/glpk>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://ftpmirror.gnu.org/gnu/glpk/glpk-5.0.tar.gz>
- **Last updated:** 2026-06-19T12:31:20-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- glpsol (cli)
- glpsol (alias)

## Dependencies

- gmp

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 5.0
- Package-manager updated: 2026-06-19
- Local data: ok
- Upstream repository: https://www.gnu.org/software/glpk/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

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

### Sources

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


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

- 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-16.fc44: normalized package name match | Fedora Rawhide package metadata: glpk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | GNU Linear Programming Kit | https://www.gnu.org/software/glpk/
- dnf - glpk-devel - 5.0-16.fc44: 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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development headers and files for GLPK | https://www.gnu.org/software/glpk/
- dnf - glpk-doc - 5.0-16.fc44: 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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Documentation for glpk | https://www.gnu.org/software/glpk/
- dnf - glpk-utils - 5.0-16.fc44: 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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-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


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Scientific computing packages](https://www.automicvault.com/pkg/scientific-computing-tools/) - Matched scientific computing metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [msc-generator](https://www.automicvault.com/pkg/brew/msc-generator/) - Popular package that depends on this formula.
- [octave](https://www.automicvault.com/pkg/brew/octave/) - Popular package that depends on this formula.
- [cbc](https://www.automicvault.com/pkg/brew/cbc/) - Shares av.db curated category or tags: cli, linear-programming, mixed-integer-programming, optimization, science.
- [lp_solve](https://www.automicvault.com/pkg/brew/lp-solve/) - Shares av.db curated category or tags: cli, linear-programming, mixed-integer-programming, optimization, science.
- [clp](https://www.automicvault.com/pkg/brew/clp/) - Shares av.db curated category or tags: cli, linear-programming, optimization, science.
- [highs](https://www.automicvault.com/pkg/brew/highs/) - Shares av.db curated category or tags: cli, linear-programming, mixed-integer-programming, optimization, science.
- [papilo](https://www.automicvault.com/pkg/brew/papilo/) - Shares av.db curated category or tags: cli, linear-programming, optimization, science.
- [scip](https://www.automicvault.com/pkg/brew/scip/) - Shares av.db curated category or tags: cli, mixed-integer-programming, optimization, science.
- [soplex](https://www.automicvault.com/pkg/brew/soplex/) - Shares av.db curated category or tags: cli, linear-programming, optimization, science.
- [g2o](https://www.automicvault.com/pkg/brew/g2o/) - Shares av.db curated category or tags: cli, optimization, science.

## Combined YAML source

View the package source record on GitHub. [combined/glpk.yml](https://github.com/automic-vault/db/blob/main/combined/glpk.yml)


## Sources

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