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

Suite of barcodes-reading tools. Version 0.23.93 via Homebrew; verified 2026-07-13. Also installable with debian: sudo apt install gir1.2-zbar-1.0.

## Install

```sh
sudo av install brew:zbar
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install zbar
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install zbar
```

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

### Linux

- apk (92%):

```sh
sudo apk add zbar
```

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

- dnf (92%):

```sh
sudo dnf install zbar
```

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

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

- pacman (92%):

```sh
sudo pacman -S zbar
```

  Evidence: Arch Linux sync databases: zbar from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install zbar
```

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

- Debian apt (92%):

```sh
sudo apt install gir1.2-zbar-1.0
```

  Evidence: Debian stable package indexes: gir1.2-zbar-1.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## Package facts

- **Package key:** brew:zbar
- **Package manager:** Homebrew
- **Version:** 0.23.93
- **Source summary:** Suite of barcodes-reading tools
- **Homepage:** <https://linuxtv.org/downloads/zbar/>
- **Repository:** <https://github.com/mchehab/zbar>
- **Last updated:** 2026-07-13T10:42:34Z
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- zbarimg (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.23.93
## Project history and usage

ZBar is an open-source C barcode and QR-code reader suite with command-line tools, camera and image scanners, GUI bindings, and language bindings used by desktop applications, scripts, and packaging ecosystems.

### Project history

The project began as Zebra, with version 0.1 in 2007 supporting basic EAN-13 and UPC-A scanning from a webcam or stored image files through `zebracam` and `zebraimg`. The 0.7 release in 2009 finalized the name change to ZBar and added Python bindings.

ZBar expanded quickly in 2008-2009: releases added Code 128, Video4Linux2 support, more image formats, GTK/PyGTK/Qt widgets, EAN-8, Code 39, Interleaved 2 of 5, Windows command-line ports, and QR Code support in 0.10. The SourceForge site presented it as a suite for reading bar codes from video streams, image files, and raw intensity sensors.

After the old upstream line stalled, Mauro Carvalho Chehab created a LinuxTV-hosted fork. NEWS.md says 0.20 in 2017 was created because upstream had no version since 2009, and focused on modern Video4Linux2 support via libv4l2, Qt5 compatibility, and new zbarcam GUI applications.

The maintained 0.23 line modernized ZBar for newer libraries: Gtk2 or Gtk3, Python2 or Python3, GObject Introspection bindings, Windows DirectShow support, and continued command-line/library use.

### Adoption history

ZBar became a common Unix packaging dependency because it is both a library and a tool suite. Distributions can ship `zbarimg` for scanning image files, `zbarcam` for webcams, development headers, and bindings used by Python, Perl, Ruby, Qt, GTK, and GObject-based applications.

Its adoption is especially visible in wrappers such as pyzbar and in distro packages that expose ZBar through GIR, Python, Qt, GTK, and CLI subpackages. That breadth kept the project relevant even when the original SourceForge release line slowed down.

The LinuxTV fork is an adoption story in itself: webcam APIs and GUI stacks changed under ZBar, so package maintainers needed a maintained upstream that could keep barcode scanning working on current kernels, desktops, Python versions, and Windows capture APIs.

### How it is used

Users run `zbarimg` against screenshots, photos, PDFs, or generated image files, or use `zbarcam` to scan a Video4Linux camera stream and print decoded symbols to standard output. Application developers link libzbar or use bindings when barcode recognition needs to be embedded in another program.

Supported symbologies across the project history include EAN/UPC variants, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code, and later SQ Code. The common packaging value is that a script or app can delegate messy image/camera barcode decoding to a small native library.

### Why package nerds care

ZBar is package-nerd significant because it is a textbook survivor package: a small C library plus CLI tools, bindings across languages, GUI integrations, and a fork that exists largely to keep old useful functionality compiling and working on modern systems.

It also shows why package metadata can hide real complexity. A formula called `zbar` may look like a simple barcode tool, but downstreams care about webcam backends, image libraries, Python and GIR bindings, Qt/GTK optionality, Windows capture support, and security fixes for untrusted QR/image parsing.

### Timeline

- 2007-03-24: First official Zebra 0.1 release, with basic webcam and image-file scanning.
- 2009-04-21: Version 0.7 finalized the project name change to ZBar and added Python bindings.
- 2009-08-31: Version 0.9 introduced Windows command-line application ports.
- 2009-10-23: Version 0.10 added QR Code support.
- 2017-04-11: Version 0.20 launched the LinuxTV fork after the old upstream line had no version since 2009.
- 2019: Versions 0.21 through 0.23 modernized compiler, Windows, Java, Gtk, Python, GIR, and DirectShow support.

### Related projects

- Related projects include pyzbar, Barcode::ZBar, zbarlight, ZXing, QR/barcode scanner applications, Video4Linux, libv4l2, GTK, Qt, GObject Introspection, and distro packages that split ZBar into CLI, library, and binding components.

### Sources

- <https://man.archlinux.org/man/extra/zbar/zbarcam.1.en>
- <https://metacpan.org/pod/Barcode%3A%3AZBar>
- <https://pypi.org/project/pyzbar/>
- <https://raw.githubusercontent.com/mchehab/zbar/master/NEWS.md>
- <https://raw.githubusercontent.com/mchehab/zbar/master/README.md>
- <https://zbar.sourceforge.net/>
- <https://zbar.sourceforge.net/about.html>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Other Package-Manager Records

- Debian apt - gir1.2-zbar-1.0 - 0.23.93-8: normalized package name match | Debian stable package indexes: gir1.2-zbar-1.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (introspection data) | https://github.com/mchehab/zbar
- Debian apt - libbarcode-zbar-perl - 0.23.93-8: normalized package name match | Debian stable package indexes: libbarcode-zbar-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (Perl bindings) | https://github.com/mchehab/zbar
- Debian apt - libzbar-dev - 0.23.93-8: normalized package name match | Debian stable package indexes: libzbar-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (development) | https://github.com/mchehab/zbar
- Debian apt - libzbar0t64 - 0.23.93-8: normalized package name match | Debian stable package indexes: libzbar0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (library) | https://github.com/mchehab/zbar
- Debian apt - libzbargtk-dev - 0.23.93-8: normalized package name match | Debian stable package indexes: libzbargtk-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (GTK+ bindings development) | https://github.com/mchehab/zbar
- Debian apt - libzbargtk0t64 - 0.23.93-8: normalized package name match | Debian stable package indexes: libzbargtk0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (GTK+ bindings) | https://github.com/mchehab/zbar
- Debian apt - libzbarqt-dev - 0.23.93-8: normalized package name match | Debian stable package indexes: libzbarqt-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (Qt binding development) | https://github.com/mchehab/zbar
- Debian apt - libzbarqt0t64 - 0.23.93-8: normalized package name match | Debian stable package indexes: libzbarqt0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (Qt binding) | https://github.com/mchehab/zbar
- Debian apt - python3-zbar - 0.23.93-8: normalized package name match | Debian stable package indexes: python3-zbar from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (Python bindings) | https://github.com/mchehab/zbar
- Debian apt - zbar-tools - 0.23.93-8: normalized package name match | Debian stable package indexes: zbar-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (utilities) | https://github.com/mchehab/zbar
- Debian apt - zbarcam-gtk - 0.23.93-8: normalized package name match | Debian stable package indexes: zbarcam-gtk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (Gtk camera tool) | https://github.com/mchehab/zbar
- Debian apt - zbarcam-qt - 0.23.93-8: normalized package name match | Debian stable package indexes: zbarcam-qt from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | QR code / bar code scanner and decoder (Qt camera tool) | https://github.com/mchehab/zbar
- Nix - zbar: normalized package name match | nixpkgs package indexes: pkgs/by-name/zb/zbar/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gir1.2-zbar-1.0 - 0.23.93-4build3: normalized package name match | Ubuntu 24.04 LTS package indexes: gir1.2-zbar-1.0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | QR code / bar code scanner and decoder (introspection data) | https://github.com/mchehab/zbar
- Ubuntu apt - libbarcode-zbar-perl - 0.23.93-4build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libbarcode-zbar-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | QR code / bar code scanner and decoder (Perl bindings) | https://github.com/mchehab/zbar
- Ubuntu apt - libzbar-dev - 0.23.93-4build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libzbar-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | QR code / bar code scanner and decoder (development) | https://github.com/mchehab/zbar


## Combined YAML source

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