# 使用 Homebrew, apk, MacPorts, Nix, pacman, apt, dnf, zypper 安装 libraw

查看 libraw 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:libraw
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libraw
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libraw
```

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

### Linux

- apk (92%):

```sh
sudo apk add libraw
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#libraw
```

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

- pacman (92%):

```sh
sudo pacman -S libraw
```

  证据: Arch Linux sync databases: libraw from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install libraw-bin
```

  证据: Debian stable package indexes: libraw-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install LibRaw
```

  证据: Fedora Rawhide package metadata: LibRaw from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- zypper (92%):

```sh
sudo zypper install libraw-devel
```

  证据: openSUSE Tumbleweed package metadata: libraw-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:libraw
- **软件包管理器:** Homebrew
- **版本:** 0.22.2
- **来源摘要:** Library for reading RAW files from digital photo cameras
- **主页:** <https://www.libraw.org/>
- **仓库:** <https://github.com/LibRaw/LibRaw>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- 4channels (别名)
- dcraw_emu (别名)
- dcraw_half (别名)
- half_mt (别名)
- mem_image (别名)
- multirender_test (别名)
- postprocessing_benchmark (别名)
- raw-identify (别名)
- rawtextdump (别名)
- simple_dcraw (别名)
- unprocessed_raw (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.22.2
## 项目历史与用法

LibRaw is a RAW photo decoding library created to turn Dave Coffin's dcraw codebase into an embeddable, thread-safer library with expanded metadata and camera-format support.

### 项目历史

The LibRaw project states that it launched in 2008 based on Dave Coffin's dcraw.c utility. Its goals were to convert dcraw into a library usable by other programs, remove global-variable style constraints, improve thread safety, import dcraw changes, and expand metadata extraction.

LibRaw's history is inseparable from dcraw. The project notes that dcraw support was reduced to a minimum in 2015 and ceased in 2018; after that, new camera and format support was handled by the LibRaw team. The rendering path inherited from dcraw remained important, while LibRaw moved contributor demosaic and post-processing experiments into separate projects when they became hard to maintain in the core library.

### 采用历史

LibRaw was adopted broadly because camera vendors produce many undocumented or semi-documented RAW formats and applications need a maintained decoding layer. Its official documentation describes embedding in RAW converters, data analyzers, and other programs that use RAW files as input, and its supported-camera list spans phone cameras, drones, cinema cameras, DSLRs, and mirrorless systems.

### 使用方式

Homebrew installs the library and sample utilities such as dcraw_emu, raw-identify, simple_dcraw, and postprocessing_benchmark. Developers use the API when they need to identify cameras, read RAW metadata, unpack sensor data, or feed image data to a separate conversion pipeline.

### 为什么软件包爱好者会关心

LibRaw is one of the cleaner examples of turning a famous single-file Unix utility into a library package. It matters to maintainers because many graphics applications can share one camera-support substrate instead of vendoring dcraw snapshots or maintaining format decoders independently.

### 时间线

- 1997: Dave Coffin's dcraw copyright lineage begins, later forming LibRaw's base.
- 2008: LibRaw project launched from dcraw.c.
- 2015: LibRaw records dcraw support being reduced to a minimum.
- 2018: LibRaw records dcraw support ceasing, with camera-format support handled by the LibRaw team thereafter.
- 2026: LibRaw documentation and supported-camera pages described the 0.22 camera support generation.

### Related projects

- LibRaw is related to dcraw, RawDigger, FastRawViewer, RAW converter applications, camera-specific RAW formats such as CRW, CR2, NEF, RAF, DNG, MOS, KDC, and DCR, and the LibRaw demosaic pack projects.

### 来源

- <https://formulae.brew.sh/formula/libraw>
- <https://github.com/LibRaw/LibRaw>
- <https://github.com/LibRaw/LibRaw/releases>
- <https://www.libraw.org/about>
- <https://www.libraw.org/docs>
- <https://www.libraw.org/supported-cameras>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - libraw-bin - 0.21.4-2: normalized package name match | Debian stable package indexes: libraw-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | raw image decoder library (tools) | https://www.libraw.org
- Debian apt - libraw-dev - 0.21.4-2: normalized package name match | Debian stable package indexes: libraw-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | raw image decoder library (development files) | https://www.libraw.org
- Debian apt - libraw-doc - 0.21.4-2: normalized package name match | Debian stable package indexes: libraw-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | raw image decoder library (documentation) | https://www.libraw.org
- Debian apt - libraw23t64 - 0.21.4-2: normalized package name match | Debian stable package indexes: libraw23t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | raw image decoder library | https://www.libraw.org
- Nix - libraw: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libraw/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libraw-bin - 0.21.2-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libraw-bin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | raw image decoder library (tools) | https://www.libraw.org
- Ubuntu apt - libraw-dev - 0.21.2-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libraw-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | raw image decoder library (development files) | https://www.libraw.org
- Ubuntu apt - libraw-doc - 0.21.2-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libraw-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | raw image decoder library (documentation) | https://www.libraw.org
- Ubuntu apt - libraw23t64 - 0.21.2-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libraw23t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | raw image decoder library | https://www.libraw.org
- apk - libraw - 0.22.2-r0: normalized package name match | Alpine Linux edge package indexes: libraw from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library for reading RAW files obtained from digital photo cameras | https://www.libraw.org/
- apk - libraw-dev - 0.22.2-r0: normalized package name match | Alpine Linux edge package indexes: libraw-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library for reading RAW files obtained from digital photo cameras (development files) | https://www.libraw.org/
- apk - libraw-tools - 0.22.2-r0: normalized package name match | Alpine Linux edge package indexes: libraw-tools from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | tools for LibRaw | https://www.libraw.org/
- dnf - LibRaw - 0.22.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: LibRaw from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Library for reading RAW files obtained from digital photo cameras | https://www.libraw.org
- dnf - LibRaw-devel - 0.22.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: LibRaw-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | LibRaw development libraries | https://www.libraw.org
- dnf - LibRaw-samples - 0.22.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: LibRaw-samples from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | LibRaw sample programs | https://www.libraw.org
- dnf - LibRaw-static - 0.22.2-1.fc45: normalized package name match | Fedora Rawhide package metadata: LibRaw-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | LibRaw static development libraries | https://www.libraw.org


## Combined YAML source

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


## 来源

- 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
