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

Gphoto2 digital camera library. Version 2.5.34 via Homebrew; verified 2026-05-30.

## Install

```sh
sudo av install brew:libgphoto2
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libgphoto2
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libgphoto2
```

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

### Linux

- apk (92%):

```sh
sudo apk add libgphoto2
```

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

- Debian apt (92%):

```sh
sudo apt install libgphoto2-6t64
```

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

- dnf (92%):

```sh
sudo dnf install libgphoto2
```

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

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

- pacman (92%):

```sh
sudo pacman -S libgphoto2
```

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

- zypper (92%):

```sh
sudo zypper install libgphoto2-6
```

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

## Package facts

- **Package key:** brew:libgphoto2
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libgphoto2>
- **Version:** 2.5.34
- **Source summary:** Gphoto2 digital camera library
- **Homepage:** <http://www.gphoto.org/proj/libgphoto2/>
- **Repository:** <https://github.com/gphoto/libgphoto2>
- **Upstream docs:** <https://gphoto.sourceforge.io/doc>
- **License:** LGPL-2.1-or-later
- **Source archive:** <https://downloads.sourceforge.net/project/gphoto/libgphoto/2.5.34/libgphoto2-2.5.34.tar.bz2>
- **Last updated:** 2026-05-30T14:49:37Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- gphoto2-config (cli)
- gphoto2-port-config (cli)
- gphoto2-config (alias)
- gphoto2-port-config (alias)

## Dependencies

- gd
- gettext
- jpeg-turbo
- libexif
- libtool
- libusb
- libusb-compat

## Build dependencies

- pkgconf

## Uses from macOS

- curl
- libxml2

## 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.5.34
- Package-manager updated: 2026-05-30
- Local data: ok
- Upstream repository: http://www.gphoto.org/proj/libgphoto2/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

libgphoto2 is the library core of the gPhoto project, giving Unix-like systems a common way to talk to digital cameras, media players, and camera protocols such as PTP and MTP. It is the backend that lets command-line tools, desktop applications, and tethering workflows use camera hardware without each application carrying its own camera-driver stack.

### Project history

The gPhoto project framed its mission around free software access to digital cameras whose vendors often published only proprietary Windows or Mac tools. The libgphoto2 project page describes the library as the core that abstracts communication ports and camera protocols, with modular port drivers and camlibs.

The libgphoto2 README calls it the successor of the original gphoto program, with additional camera drivers and a backend-library design rather than a standalone GUI. That split let gphoto2, gtkam, desktop photo tools, and other frontends share the same camera-access layer.

### Adoption history

gPhoto reports support for more than 2700 cameras and media players on its project home page, while the generated support table dated 2026-05-30 lists 3013 supported cameras and media players for libgphoto2 2.5.34. The project also notes that PTP, MTP, and PictBridge devices can work generically without needing a specific model entry.

The README lists frontends and consumers including gphoto2, digiKam, gThumb, Shotwell, Darktable, Entangle, GIMP integration, gphotofs, and gtkam. That mix made libgphoto2 a common Linux photography dependency for import, tethering, capture, and camera metadata workflows.

### How it is used

Applications use libgphoto2 to detect cameras, download images, upload to picture frames, query configuration, trigger capture, and perform remote control where the camera and protocol allow it. The companion gphoto2 CLI exposes much of that power for scripts.

The library deliberately does not replace USB mass-storage handling; the project tells users to let the operating system mount mass-storage cameras. libgphoto2 is most valuable for protocol cameras and vendor-specific behavior that a normal filesystem mount cannot expose.

### Why package nerds care

libgphoto2 is hardware-shaped packaging: the package is not just code, it carries camlibs, USB/PTP/MTP knowledge, udev-era history, translations, and a continually refreshed device table. A simple version bump can mean new camera IDs, changed remote-control behavior, or security fixes for parsing data from untrusted USB devices.

For package managers, it sits at the intersection of media apps, desktop environments, USB libraries, and scripting tools. It is also a reminder that old cameras and odd vendor protocols remain part of the compatibility surface long after the original hardware stopped being fashionable.

### Timeline

- 2000: The generated support output credits gphoto2 copyright beginning in 2000.
- 2015-08-01: The gPhoto project announced migration to GitHub for code hosting and issue tracking.
- 2022-01-03: libgphoto2 and gphoto2 2.5.28 were announced with cleanup of obsolete OS/2 and hotplug packaging support.
- 2025-07-06: libgphoto2 and gphoto2 2.5.32 were announced with Meson build support, runtime-configurable library paths, and many camera IDs.
- 2026-05-30: libgphoto2 2.5.34 was announced and the support page listed 3013 supported cameras and media players.

### Related projects

- gphoto2 is the command-line frontend that exposes libgphoto2 functions for users and scripts.
- gtkam, gphotofs, digiKam, gThumb, Shotwell, Darktable, Entangle, and GIMP integrations are examples of applications or frontends using the library.
- PTP, MTP, and PictBridge are camera/media protocols that shape libgphoto2's driver model.

### Sources

- <http://www.gphoto.org/>
- <http://www.gphoto.org/proj/libgphoto2/>
- <https://github.com/gphoto/libgphoto2>
- <https://github.com/gphoto/libgphoto2/blob/master/NEWS>
- <https://github.com/gphoto/libgphoto2/blob/master/README.md>
- <https://gphoto.sourceforge.io/proj/libgphoto2/support.php>


## 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:** libgphoto2
- **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 - libgphoto2-6t64 - 2.5.31-4: normalized package name match | Debian stable package indexes: libgphoto2-6t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | gphoto2 digital camera library | https://github.com/gphoto/libgphoto2/
- Debian apt - libgphoto2-dev - 2.5.31-4: normalized package name match | Debian stable package indexes: libgphoto2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | gphoto2 digital camera library (development files) | https://github.com/gphoto/libgphoto2/
- Debian apt - libgphoto2-dev-doc - 2.5.31-4: normalized package name match | Debian stable package indexes: libgphoto2-dev-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | gphoto2 digital camera library (development documentation) | https://github.com/gphoto/libgphoto2/
- Debian apt - libgphoto2-l10n - 2.5.31-4: normalized package name match | Debian stable package indexes: libgphoto2-l10n from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | gphoto2 digital camera library - localized messages | https://github.com/gphoto/libgphoto2/
- Debian apt - libgphoto2-port12t64 - 2.5.31-4: normalized package name match | Debian stable package indexes: libgphoto2-port12t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | gphoto2 digital camera port library | https://github.com/gphoto/libgphoto2/
- Nix - libgphoto2: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libgphoto2/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libgphoto2-6t64 - 2.5.31-2.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgphoto2-6t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | gphoto2 digital camera library | https://github.com/gphoto/libgphoto2/
- Ubuntu apt - libgphoto2-dev - 2.5.31-2.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgphoto2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | gphoto2 digital camera library (development files) | https://github.com/gphoto/libgphoto2/
- Ubuntu apt - libgphoto2-dev-doc - 2.5.31-2.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgphoto2-dev-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | gphoto2 digital camera library (development documentation) | https://github.com/gphoto/libgphoto2/
- Ubuntu apt - libgphoto2-l10n - 2.5.31-2.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgphoto2-l10n from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | gphoto2 digital camera library - localized messages | https://github.com/gphoto/libgphoto2/
- Ubuntu apt - libgphoto2-port12t64 - 2.5.31-2.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgphoto2-port12t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | gphoto2 digital camera port library | https://github.com/gphoto/libgphoto2/
- apk - libgphoto2 - 2.5.33-r1: normalized package name match | Alpine Linux edge package indexes: libgphoto2 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The core library of gphoto2, designed to allow access to digital camera by external programs | http://www.gphoto.org
- apk - libgphoto2-dev - 2.5.33-r1: normalized package name match | Alpine Linux edge package indexes: libgphoto2-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The core library of gphoto2, designed to allow access to digital camera by external programs (development files) | http://www.gphoto.org
- apk - libgphoto2-doc - 2.5.33-r1: normalized package name match | Alpine Linux edge package indexes: libgphoto2-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The core library of gphoto2, designed to allow access to digital camera by external programs (documentation) | http://www.gphoto.org
- apk - libgphoto2-udev - 2.5.33-r1: normalized package name match | Alpine Linux edge package indexes: libgphoto2-udev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The core library of gphoto2, designed to allow access to digital camera by external programs (udev rules) | http://www.gphoto.org
- dnf - libgphoto2 - 2.5.33-2.fc44: normalized package name match | Fedora Rawhide package metadata: libgphoto2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Library for accessing digital cameras | http://www.gphoto.org/


## 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.
- [Media and graphics packages](https://www.automicvault.com/pkg/media-graphics-tools/) - Matched media, image, audio, video, or graphics metadata.
- [Web development packages](https://www.automicvault.com/pkg/web-dev-tools/) - Matched web development metadata.
- [gd](https://www.automicvault.com/pkg/brew/gd/) - Runtime dependency declared by Homebrew.
- [gettext](https://www.automicvault.com/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [jpeg-turbo](https://www.automicvault.com/pkg/brew/jpeg-turbo/) - Runtime dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/pkg/brew/libtool/) - Runtime dependency declared by Homebrew.
- [libusb-compat](https://www.automicvault.com/pkg/brew/libusb-compat/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [gphoto2](https://www.automicvault.com/pkg/brew/gphoto2/) - Popular package that depends on this formula.
- [camellia](https://www.automicvault.com/pkg/brew/camellia/) - Shares av.db curated category or tags: c-library, cli, media.
- [exiftags](https://www.automicvault.com/pkg/brew/exiftags/) - Shares av.db curated category or tags: cli, digital-camera, media.
- [freetype](https://www.automicvault.com/pkg/brew/freetype/) - Shares av.db curated category or tags: c-library, cli, media.
- [fribidi](https://www.automicvault.com/pkg/brew/fribidi/) - Shares av.db curated category or tags: c-library, cli, media.
- [gdk-pixbuf](https://www.automicvault.com/pkg/brew/gdk-pixbuf/) - Shares av.db curated category or tags: c-library, cli, media.
- [h264bitstream](https://www.automicvault.com/pkg/brew/h264bitstream/) - Shares av.db curated category or tags: c-library, cli, media.
- [hqx](https://www.automicvault.com/pkg/brew/hqx/) - Shares av.db curated category or tags: c-library, cli, media.
- [leptonica](https://www.automicvault.com/pkg/brew/leptonica/) - Shares av.db curated category or tags: c-library, cli, media.
- [fontforge](https://www.automicvault.com/pkg/brew/fontforge/) - Local package facts share a topical domain. Shared terms: cli, gettext, jpeg, jpeg-turbo, libtool.
- [imagemagick](https://www.automicvault.com/pkg/brew/imagemagick/) - Local package facts share a topical domain. Shared terms: cli, config, jpeg, jpeg-turbo, libtool.

## Combined YAML source

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