# Install liblinear with Homebrew, apt, dnf, MacPorts, Nix, apk, zypper

Library for large linear classification. Version 2.50 via Homebrew; verified 2026-06-19.

## Install

```sh
sudo av install brew:liblinear
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install liblinear
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install liblinear
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install liblinear-dev
```

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

- dnf (92%):

```sh
sudo dnf install liblinear
```

  Evidence: Fedora Rawhide package metadata: liblinear 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#liblinear
```

  Evidence: nixpkgs package indexes: pkgs/by-name/li/liblinear/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- apk (92%):

```sh
sudo apk add predict
```

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

- zypper (92%):

```sh
sudo zypper install predict
```

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

## Package facts

- **Package key:** brew:liblinear
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/liblinear>
- **Version:** 2.50
- **Source summary:** Library for large linear classification
- **Homepage:** <https://www.csie.ntu.edu.tw/~cjlin/liblinear/>
- **Repository:** <https://github.com/cjlin1/liblinear>
- **Upstream docs:** <https://github.com/cjlin1/liblinear#readme>
- **License:** BSD-3-Clause
- **Source archive:** <https://www.csie.ntu.edu.tw/~cjlin/liblinear/oldfiles/liblinear-2.50.tar.gz>
- **Last updated:** 2026-06-19T12:32:37-07:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- predict (cli)
- train (cli)
- predict (alias)
- train (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.50
- Package-manager updated: 2026-06-19
- Local data: ok
- Upstream repository: https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

LIBLINEAR is a National Taiwan University machine-learning package for large-scale regularized linear classification, regression, and outlier detection. It pairs a C/C++ library with simple command-line tools such as train and predict, making linear SVM and logistic-regression models accessible from scripts and other software.

### Project history

The LIBLINEAR paper was submitted to the Journal of Machine Learning Research in May 2008 and published in August 2008 by Rong-En Fan, Kai-Wei Chang, Cho-Jui Hsieh, Xiang-Rui Wang, and Chih-Jen Lin. The paper presents LIBLINEAR as an open source library for large-scale linear classification with easy command-line tools and library calls.

LIBLINEAR was designed as a sibling to LIBSVM for cases where a linear model is appropriate and kernel methods are too expensive. The README explicitly advises beginners with small data sets to consider LIBSVM first, while pointing to LIBLINEAR for large data where nonlinear mappings do not materially improve performance.

The public GitHub mirror was created on May 19, 2014, giving the project a familiar source-control home for packagers and downstream wrappers.

### Adoption history

LIBLINEAR spread through both command-line use and embedding. Its stable file format, simple executables, MATLAB/OCTAVE interface, Python interface, and C API made it easy to package and wrap.

One visible downstream adoption path is scikit-learn, whose LogisticRegression documentation exposes a 'liblinear' solver for L1 and L2 regularization. That made the project familiar even to Python users who never invoke the original train and predict binaries.

### How it is used

The canonical workflow is to build the package with make, train a model from sparse feature data using train, and apply the model with predict. The README describes the LIBSVM-style data format, included heart_scale example, solver selection, cross validation, and parameter search.

### Why package nerds care

LIBLINEAR is package-nerd catnip because it is a small, fast C/C++ implementation of a heavily cited ML method with stable Unix-style tools. It is the kind of dependency that appears behind higher-level language bindings while still remaining useful as a direct CLI package.

### Timeline

- 2008: LIBLINEAR paper submitted in May and published in JMLR in August.
- 2014: Public GitHub mirror created on May 19, 2014.
- 2022: NTU-hosted LIBLINEAR paper PDF marked last modified on March 5, 2022.
- 2025: GitHub repository metadata recorded push activity on December 29, 2025.

### Related projects

- LIBSVM is the closest related project and the source of much of the package style, data-format familiarity, and user workflow.
- scikit-learn exposes LIBLINEAR as a solver option in LogisticRegression, carrying the implementation into the Python scientific ecosystem.

### Sources

- <https://api.github.com/repos/cjlin1/liblinear>
- <https://github.com/cjlin1/liblinear>
- <https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html>
- <https://www.csie.ntu.edu.tw/~cjlin/liblinear/>
- <https://www.csie.ntu.edu.tw/~cjlin/papers/liblinear.pdf>
- <https://www.jmlr.org/papers/v9/fan08a.html>


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

## Other Package-Manager Records

- Debian apt - liblinear-dev - 2.3.0+dfsg-5+b2: normalized package name match | Debian stable package indexes: liblinear-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development libraries and header files for LIBLINEAR | https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- Debian apt - liblinear-tools - 2.3.0+dfsg-5+b2: normalized package name match | Debian stable package indexes: liblinear-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Standalone applications for LIBLINEAR | https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- Debian apt - liblinear4 - 2.3.0+dfsg-5+b2: normalized package name match | Debian stable package indexes: liblinear4 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library for Large Linear Classification | https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- Debian apt - python3-liblinear - 2.3.0+dfsg-5: normalized package name match | Debian stable package indexes: python3-liblinear from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Python 3 bindings for LIBLINEAR | https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- Nix - liblinear: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/liblinear/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - liblinear-dev - 2.3.0+dfsg-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: liblinear-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Development libraries and header files for LIBLINEAR | https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- Ubuntu apt - liblinear-tools - 2.3.0+dfsg-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: liblinear-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Standalone applications for LIBLINEAR | https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- Ubuntu apt - liblinear4 - 2.3.0+dfsg-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: liblinear4 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library for Large Linear Classification | https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- Ubuntu apt - python3-liblinear - 2.3.0+dfsg-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-liblinear from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Python 3 bindings for LIBLINEAR | https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- dnf - liblinear - 1.94-47.fc45: normalized package name match | Fedora Rawhide package metadata: liblinear from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Library for Large Linear Classification | http://www.csie.ntu.edu.tw/~cjlin/liblinear
- dnf - liblinear-cli - 1.94-47.fc45: normalized package name match | Fedora Rawhide package metadata: liblinear-cli from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | CLI-tools for liblinear | http://www.csie.ntu.edu.tw/~cjlin/liblinear
- dnf - liblinear-devel - 1.94-47.fc45: normalized package name match | Fedora Rawhide package metadata: liblinear-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for liblinear | http://www.csie.ntu.edu.tw/~cjlin/liblinear
- dnf - liblinear-doc - 1.94-47.fc45: normalized package name match | Fedora Rawhide package metadata: liblinear-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Documentation files for liblinear | http://www.csie.ntu.edu.tw/~cjlin/liblinear
- dnf - python3-liblinear - 1.94-47.fc45: normalized package name match | Fedora Rawhide package metadata: python3-liblinear from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Python3 bindings for liblinear | http://www.csie.ntu.edu.tw/~cjlin/liblinear
- MacPorts - liblinear: normalized package name match | MacPorts ports tree: math/liblinear/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- apk - predict - 2.3.1-r0: installed executable or alias match | Alpine Linux edge package indexes: predict from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Multi-user satellite tracking and orbital prediction program | https://www.qsl.net/kd2bd/predict.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.
- [nmap](https://www.automicvault.com/pkg/brew/nmap/) - Popular package that depends on this formula.
- [grt](https://www.automicvault.com/pkg/brew/grt/) - Shares av.db curated category or tags: cli, cpp, machine-learning, science.
- [mlpack](https://www.automicvault.com/pkg/brew/mlpack/) - Shares av.db curated category or tags: cli, cpp, machine-learning, science.
- [tinysvm](https://www.automicvault.com/pkg/brew/tinysvm/) - Shares av.db curated category or tags: classification, cli, machine-learning, science.
- [gibbslda](https://www.automicvault.com/pkg/brew/gibbslda/) - Shares av.db curated category or tags: cli, machine-learning, science.
- [openvino](https://www.automicvault.com/pkg/brew/openvino/) - Shares av.db curated category or tags: cli, machine-learning, science.
- [flann](https://www.automicvault.com/pkg/brew/flann/) - Shares av.db curated category or tags: cli, machine-learning, science.
- [octomap](https://www.automicvault.com/pkg/brew/octomap/) - Shares av.db curated category or tags: cli, cpp, science.
- [ode](https://www.automicvault.com/pkg/brew/ode/) - Shares av.db curated category or tags: cli, cpp, science.

## Combined YAML source

View the package source record on GitHub. [combined/liblinear.yml](https://github.com/automic-vault/db/blob/main/combined/liblinear.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
