# flex mit Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper installieren

Prüfe Installationswege, Executables, Metadaten und Sicherheitshinweise für flex in AI-Agent-Workflows.

## Installation

```sh
sudo av install brew:flex
```

Weitere Installationsbefehle:

### macOS

- Homebrew (100%):

```sh
brew install flex
```

  Evidenz: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install flex
```

  Evidenz: MacPorts ports tree: devel/flex/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add flex
```

  Evidenz: Alpine Linux edge package indexes: flex from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install flex
```

  Evidenz: Debian stable package indexes: flex from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install flex
```

  Evidenz: Fedora Rawhide package metadata: flex 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#flex
```

  Evidenz: nixpkgs package indexes: flex from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S flex
```

  Evidenz: Arch Linux sync databases: flex from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- zypper (92%):

```sh
sudo zypper install flex
```

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

## Paketfakten

- **Paketschlüssel:** brew:flex
- **Paketmanager:** Homebrew
- **Version:** 2.6.4
- **Quellzusammenfassung:** Fast Lexical Analyzer, generates Scanners (tokenizers)
- **Homepage:** <https://github.com/westes/flex>
- **Repository:** <https://github.com/westes/flex>
- **Zuletzt aktualisiert:** 2026-06-22T14:03:20-07:00
- **Generiert:** 2026-08-03T19:37:03+00:00

## Executables

- flex (Alias)
- flex++ (Alias)
- lex (Alias)

## Installationsverhalten

- Bottle: nicht verfügbar

## Version und Aktualität

- Seite generiert: 2026-08-03
- Manager-Version: 2.6.4
## Projektgeschichte und Nutzung

flex is the fast lexical analyzer generator, the long-running free-software successor in the lex family. It generates scanners for recognizing lexical patterns in text and remains a foundational build-time package for C, C++, parser, compiler, and language-tooling stacks.

### Projektgeschichte

The upstream README describes flex as a tool for generating scanners and notes that the code derives from software contributed to Berkeley by Vern Paxson. Its distribution includes user documentation, examples, tests, internationalization files, and libfl support.

The project moved its main codebase, issue tracking, pull requests, and source releases to GitHub during the 2.6.1 release cycle in 2016, after earlier SourceForge-era mailing-list infrastructure. The 2.6.x NEWS entries record modernization work around generated scanners, portability, cross compilation, tests, build tooling, and release artifacts.

### Adoptionsgeschichte

flex is a standard dependency in Unix-like development environments because many source packages generate or ship scanners built from `.l` files. The supplied package metadata records availability across apk, Homebrew, Debian, Fedora, MacPorts, Nix, pacman, Ubuntu, and zypper, reflecting its role as a baseline developer tool rather than a niche application.

### Wie es verwendet wird

Users write lexical rules and run flex to generate C or C++ scanner code. The generated scanner is then compiled into a program, commonly alongside parser generators and build systems for compilers, interpreters, protocol tools, data importers, and other text-processing software.

Package maintainers care about whether a release tarball includes generated intermediate files, which flex version built the distributed scanner, and whether cross-compilation and bootstrap paths work. The official NEWS repeatedly calls out these build and portability concerns.

### Warum Paket-Nerds sich dafür interessieren

flex is one of the canonical examples of a package that is both a user-facing command and a build dependency. It shows up in dependency graphs far from compiler projects because scanner generation is a common prebuild step, and its own bootstrap story matters to source-based distributions.

### Zeitleiste

- 1980s: flex originates from Berkeley-contributed scanner-generator work by Vern Paxson.
- 2013: westes/flex GitHub repository created.
- 2016: 2.6.1 announces GitHub as the project host for code, releases, issues, and pull requests.
- 2016: 2.6.3 improves cross-compilation and bootstrap behavior.
- 2017: 2.6.4 stable release includes portability, build, scanner, documentation, and test-suite fixes.

### Related projects

- lex is the historical Unix scanner generator lineage to which flex is related.
- Bison, yacc-family parser generators, autotools, m4, and libfl are common adjacent tools in flex build and usage contexts.
- SourceForge remains relevant for flex mailing-list archives even though the codebase and releases are on GitHub.

### Quellen

- <https://api.github.com/repos/westes/flex>
- <https://api.github.com/repos/westes/flex/tags?per_page=100>
- <https://formulae.brew.sh/formula/flex>
- <https://github.com/westes/flex>
- <https://raw.githubusercontent.com/westes/flex/master/NEWS>
- <https://raw.githubusercontent.com/westes/flex/master/README.md>
- <https://westes.github.io/flex/manual>


## Sicherheitshinweise

narrow executable package without higher-risk signals.

- **Geiger-Risiko:** grün / niedrig
- narrow executable package without higher-risk signals

## Andere Paketmanager-Einträge

- Debian apt - flex - 2.6.4-8.2+b4: normalized package name match | Debian stable package indexes: flex from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast lexical analyzer generator | https://github.com/westes/flex
- Debian apt - flex-doc - 2.6.4-8.2: normalized package name match | Debian stable package indexes: flex-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Documentation for flex (a fast lexical analyzer generator) | https://github.com/westes/flex
- Debian apt - libfl-dev - 2.6.4-8.2+b4: normalized package name match | Debian stable package indexes: libfl-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | static library for flex (a fast lexical analyzer generator) | https://github.com/westes/flex
- Debian apt - libfl2 - 2.6.4-8.2+b4: normalized package name match | Debian stable package indexes: libfl2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SHARED library for flex (a fast lexical analyzer generator) | https://github.com/westes/flex
- Nix - flex: normalized package name match | nixpkgs package indexes: flex from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - flex - 2.6.4-8.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: flex from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | fast lexical analyzer generator | https://github.com/westes/flex
- Ubuntu apt - flex-doc - 2.6.4-8.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: flex-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Documentation for flex (a fast lexical analyzer generator) | https://github.com/westes/flex
- Ubuntu apt - libfl-dev - 2.6.4-8.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libfl-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | static library for flex (a fast lexical analyzer generator) | https://github.com/westes/flex
- Ubuntu apt - libfl2 - 2.6.4-8.2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libfl2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | SHARED library for flex (a fast lexical analyzer generator) | https://github.com/westes/flex
- apk - flex - 2.6.4-r8: normalized package name match | Alpine Linux edge package indexes: flex from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool for generating text-scanning programs | https://github.com/westes/flex
- apk - flex-dev - 2.6.4-r8: normalized package name match | Alpine Linux edge package indexes: flex-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool for generating text-scanning programs (development files) | https://github.com/westes/flex
- apk - flex-doc - 2.6.4-r8: normalized package name match | Alpine Linux edge package indexes: flex-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool for generating text-scanning programs (documentation) | https://github.com/westes/flex
- apk - flex-libs - 2.6.4-r8: normalized package name match | Alpine Linux edge package indexes: flex-libs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | A tool for generating text-scanning programs (libraries) | https://github.com/westes/flex
- dnf - flex - 2.6.4-25.fc45: normalized package name match | Fedora Rawhide package metadata: flex from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A tool for generating scanners (text pattern recognizers) | https://github.com/westes/flex
- dnf - libfl-devel - 2.6.4-25.fc45: normalized package name match | Fedora Rawhide package metadata: libfl-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for the flex scanner generator | https://github.com/westes/flex
- dnf - libfl-static - 2.6.4-25.fc45: normalized package name match | Fedora Rawhide package metadata: libfl-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Static libraries for the flex scanner generator | https://github.com/westes/flex


## Combined YAML source

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


## Quellen

- 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
