# Install libsepol with Homebrew, apk, apt, dnf, Nix, zypper

SELinux binary policy manipulation library. Version 3.11 via Homebrew; verified 2026-07-01.

## Install

```sh
sudo av install brew:libsepol
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libsepol
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add libsepol
```

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

- Debian apt (92%):

```sh
sudo apt install libsepol-dev
```

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

- dnf (92%):

```sh
sudo dnf install libsepol
```

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

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

- zypper (92%):

```sh
sudo zypper install libsepol-devel
```

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

## Package facts

- **Package key:** brew:libsepol
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libsepol>
- **Version:** 3.11
- **Source summary:** SELinux binary policy manipulation library
- **Homepage:** <https://github.com/SELinuxProject/selinux>
- **Repository:** <https://github.com/SELinuxProject/selinux>
- **Upstream docs:** <https://github.com/SELinuxProject/selinux/wiki>
- **License:** LGPL-2.1-or-later
- **Source archive:** <https://github.com/SELinuxProject/selinux/releases/download/3.11/libsepol-3.11.tar.gz>
- **Last updated:** 2026-07-01T18:53:14Z
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- chkcon (cli)
- sepol_check_access (cli)
- sepol_compute_av (cli)
- sepol_compute_member (cli)
- sepol_compute_relabel (cli)
- sepol_validate_transition (cli)
- chkcon (alias)
- sepol_check_access (alias)
- sepol_compute_av (alias)
- sepol_compute_member (alias)
- sepol_compute_relabel (alias)
- sepol_validate_transition (alias)

## Build dependencies

- coreutils

## 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: 3.11
- Package-manager updated: 2026-07-01
- Local data: ok
- Upstream repository: https://github.com/SELinuxProject/selinux
- info: No cached GitHub release or tag data was available.
## Project history and usage

libsepol is the SELinux binary policy manipulation library. It sits below higher-level management tools and policy compilers, handling the compiled policy representation that the kernel consumes.

### Project history

libsepol grew as part of the SELinux userspace stack, which was separated from the kernel-side mandatory access-control mechanism into libraries, compilers, and administrative tools. The SELinuxProject repository contains libsepol alongside libselinux, libsemanage, policycoreutils, checkpolicy, and secilc.

The upstream userspace package documentation describes secilc and checkpolicy as using libsepol to generate binary policy. It also describes libsemanage as relying on libsepol for binary policy manipulation and on libselinux for interaction with the running SELinux system.

### Adoption history

libsepol's adoption followed SELinux adoption in distributions: it is packaged as a base SELinux userspace component rather than as a user-facing application. Systems that build, load, downgrade, inspect, or manage SELinux policy tend to pull in libsepol directly or indirectly.

The library is also useful outside a fully SELinux-enabled Linux system, because policy analysis and compilation workflows can run on systems that are not enforcing SELinux.

### How it is used

Administrators usually touch libsepol indirectly through semodule, semanage, checkpolicy, secilc, load_policy, and related SELinux tools. The Homebrew formula exposes helper commands such as chkcon and sepol_check_access for policy-oriented checks.

For developers, libsepol is the lower-level library to use when the task is reading, writing, checking, or transforming SELinux binary policy rather than asking the running system for a process or file context.

### Why package nerds care

libsepol is the package that reminds distro maintainers that SELinux is not one package: the enforcement model depends on a layered toolchain. libselinux is the runtime-facing layer, libsepol is the binary-policy layer, and libsemanage plus policycoreutils build the administrative experience above them.

Because Homebrew can build libsepol on macOS mainly for policy analysis, it is a neat example of a Linux security component whose most portable part is the file-format and compiler tooling.

### Timeline

- 2001: NSA published SELinux technical reports on the original Linux kernel patch and Linux Security Module integration.
- 2008-09-09: The SELinux userspace release archive lists coordinated source tarball releases including libsepol.
- 2015-02-02: The userspace release archive includes libsepol 2.4 alongside libselinux 2.4 and related packages.
- 2026-02-02: SELinuxProject repository metadata records SELinux userspace release 3.10.

### Related projects

- checkpolicy and secilc use libsepol to produce binary policy, libsemanage uses it when managing policy modules, libselinux may use it when loading policy, and policycoreutils provides many of the command-line tools around those libraries.

### Sources

- <https://github.com/SELinuxProject/selinux>
- <https://github.com/SELinuxProject/selinux/wiki>
- <https://github.com/SELinuxProject/selinux/wiki/Releases>
- <https://github.com/SELinuxProject/selinux/wiki/Userspace-Packages>
- <https://www.nsa.gov/Research/Technical-Papers-Brochures/smdpage14229/2/smdsort14229/description/>


## 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:** libsepol
- **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 - libsepol-dev - 3.8.1-1: normalized package name match | Debian stable package indexes: libsepol-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SELinux binary policy manipulation library and development files | https://selinuxproject.org
- Debian apt - libsepol2 - 3.8.1-1: normalized package name match | Debian stable package indexes: libsepol2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SELinux library for manipulating binary security policies | https://selinuxproject.org
- Debian apt - sepol-utils - 3.8.1-1: normalized package name match | Debian stable package indexes: sepol-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Security Enhanced Linux policy utility programs | https://selinuxproject.org
- Nix - libsepol: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libsepol/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libsepol-dev - 3.5-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libsepol-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | SELinux binary policy manipulation library and development files | https://selinuxproject.org
- Ubuntu apt - libsepol2 - 3.5-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libsepol2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | SELinux library for manipulating binary security policies | https://selinuxproject.org
- Ubuntu apt - sepol-utils - 3.5-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: sepol-utils from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Security Enhanced Linux policy utility programs | https://selinuxproject.org
- apk - libsepol - 3.10-r0: normalized package name match | Alpine Linux edge package indexes: libsepol from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | SELinux binary policy manipulation library | https://github.com/SELinuxProject/selinux/wiki
- apk - libsepol-dev - 3.10-r0: normalized package name match | Alpine Linux edge package indexes: libsepol-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | SELinux binary policy manipulation library (development files) | https://github.com/SELinuxProject/selinux/wiki
- apk - libsepol-doc - 3.10-r0: normalized package name match | Alpine Linux edge package indexes: libsepol-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | SELinux binary policy manipulation library (documentation) | https://github.com/SELinuxProject/selinux/wiki
- dnf - libsepol - 3.10-1.fc44: normalized package name match | Fedora Rawhide package metadata: libsepol from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | SELinux binary policy manipulation library | https://github.com/SELinuxProject/selinux/wiki
- dnf - libsepol-devel - 3.10-1.fc44: normalized package name match | Fedora Rawhide package metadata: libsepol-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Header files and libraries used to build policy manipulation tools | https://github.com/SELinuxProject/selinux/wiki
- dnf - libsepol-static - 3.10-1.fc44: normalized package name match | Fedora Rawhide package metadata: libsepol-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | static libraries used to build policy manipulation tools | https://github.com/SELinuxProject/selinux/wiki
- dnf - libsepol-utils - 3.10-1.fc44: normalized package name match | Fedora Rawhide package metadata: libsepol-utils from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | SELinux libsepol utilities | https://github.com/SELinuxProject/selinux/wiki
- zypper - libsepol-devel - 3.10-1.3: normalized package name match | openSUSE Tumbleweed package metadata: libsepol-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for SELinux's binary policy manipulation library | https://github.com/SELinuxProject/selinux/wiki/Releases
- zypper - libsepol-devel-static - 3.10-1.3: normalized package name match | openSUSE Tumbleweed package metadata: libsepol-devel-static from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Static archives for SELinux's binary policy manipulation library | https://github.com/SELinuxProject/selinux/wiki/Releases


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [Security and crypto packages](https://www.automicvault.com/pkg/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [coreutils](https://www.automicvault.com/pkg/brew/coreutils/) - Build dependency declared by Homebrew.
- [libselinux](https://www.automicvault.com/pkg/brew/libselinux/) - Popular package that depends on this formula.
- [gator](https://www.automicvault.com/pkg/brew/gator/) - Shares av.db curated category or tags: cli, policy, security.
- [acme.sh](https://www.automicvault.com/pkg/brew/acme-sh/) - Shares av.db curated category or tags: cli, security.
- [aescrypt](https://www.automicvault.com/pkg/brew/aescrypt/) - Shares av.db curated category or tags: cli, security.
- [aespipe](https://www.automicvault.com/pkg/brew/aespipe/) - Shares av.db curated category or tags: cli, security.
- [afflib](https://www.automicvault.com/pkg/brew/afflib/) - Shares av.db curated category or tags: cli, security.
- [afl++](https://www.automicvault.com/pkg/brew/afl/) - Shares av.db curated category or tags: cli, security.
- [age](https://www.automicvault.com/pkg/brew/age/) - Shares av.db curated category or tags: cli, security.
- [terraform-iam-policy-validator](https://www.automicvault.com/pkg/brew/terraform-iam-policy-validator/) - Security-sensitive metadata or terminology overlaps. Shared terms: access, cli, policy, security, validate.
- [keyring](https://www.automicvault.com/pkg/brew/keyring/) - Security-sensitive metadata or terminology overlaps. Shared terms: access, cli, management, security.

## Combined YAML source

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