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

Library for Linear and Mixed-Integer Programming. Version 5.0 via Homebrew; verified 2026-06-19. Also installable with debian: sudo apt install glpk-doc.

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- 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

### 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='10.804','zoxide'

## Package facts

- **Package key:** brew:glpk
- **Package manager:** Homebrew
- **Version:** 5.0
- **Source summary:** Library for Linear and Mixed-Integer Programming
- **Homepage:** <https://www.gnu.org/software/glpk/>
- **Last updated:** 2026-06-19T12:31:20-07:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- glpsol (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 5.0
## 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

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


## Sources

- 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
