# 使用 Homebrew, dnf, Nix, pacman, apt, zypper 安装 ocl-icd

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

## 安装

```sh
sudo av install brew:ocl-icd
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ocl-icd
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install ocl-icd
```

  证据: Fedora Rawhide package metadata: ocl-icd from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#ocl-icd
```

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

- pacman (92%):

```sh
sudo pacman -S ocl-icd
```

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

- Debian apt (92%):

```sh
sudo apt install ocl-icd-dev
```

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

- zypper (92%):

```sh
sudo zypper install libOpenCL1
```

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

## 软件包事实

- **软件包键:** brew:ocl-icd
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ocl-icd>
- **版本:** 2.3.5
- **来源摘要:** OpenCL ICD loader
- **主页:** <https://github.com/OCL-dev/ocl-icd/>
- **仓库:** <https://github.com/OCL-dev/ocl-icd>
- **上游文档:** <https://github.com/OCL-dev/ocl-icd/>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://github.com/OCL-dev/ocl-icd/archive/refs/tags/v2.3.5.tar.gz>
- **最后更新:** 2026-06-25T13:37:58+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 构建依赖

- asciidoc
- autoconf
- automake
- libtool
- opencl-headers
- xmlto

## 安装行为

- post-install 钩子: 未定义
- 注意事项: The default vendors directory is $HOMEBREW_PREFIX/etc/OpenCL/vendors
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.3.5
- 管理器更新时间: 2026-06-25
- 本地数据: OK
- 上游仓库: https://github.com/OCL-dev/ocl-icd
- 检测到的最新版本: v2.3.5 (当前)
## 项目历史与用法

ocl-icd is a free OpenCL Installable Client Driver loader. Its job is not to implement OpenCL computation itself, but to expose OpenCL entry points, discover vendor implementations, and dispatch calls to the correct implementation.

### 项目历史

The OCL-dev README describes ocl-icd as an open source alternative to vendor-specific OpenCL ICD loaders. The project was built around a practical reverse-engineering and compatibility problem: the order of function pointers inside loader dispatch tables was not publicly available for all cases, so ocl-icd maintains a YAML database of known and guessed entries.

The project also ships a skeleton of bindings that OpenCL implementations can incorporate to add ICD functionality. Its `update-database` flow can install a dummy OpenCL implementation and probe another loader to discover new dispatch entries, reflecting the messy reality of keeping an independent loader compatible with a moving GPU API surface.

Khronos' official OpenCL ICD Loader documentation describes the same general ICD mechanism: applications link against a loader, and the loader enumerates OpenCL implementations and forwards API calls. ocl-icd is the long-running third-party implementation that many Unix-like distributions packaged before or alongside the Khronos-maintained loader.

### 采用历史

ocl-icd is packaged across Linux and Unix-like ecosystems because OpenCL applications need a `libOpenCL.so` provider even when the actual compute implementation comes from a GPU vendor or portable implementation such as POCL. The Debian package page for `ocl-icd-opencl-dev` describes it as providing OpenCL development files and ensuring the ocl-icd loader is installed.

Homebrew packages ocl-icd as keg-only on macOS because macOS provides OpenCL.framework, and the formula conflicts with `opencl-icd-loader` because both install `lib/libOpenCL.so`. The formula API generated on 2026-07-01 lists 202 installs over 365 days, which is small direct Homebrew usage but consistent with a low-level compatibility library that is often pulled through dependencies.

### 使用方式

Users and packagers install ocl-icd so OpenCL applications can link against one loader while individual vendor drivers are registered through `.icd` files, commonly under `/etc/OpenCL/vendors` or the Homebrew prefix's `etc/OpenCL/vendors` directory.

The tool and library matter most in build farms, Linux desktop/GPU stacks, scientific software, and package-manager dependency graphs, where code should not have to link directly to a single vendor's OpenCL runtime.

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

ocl-icd is package-nerd infrastructure: it is a small library whose metadata has outsized consequences for GPU software resolution, conflicts, keg-only status, and virtual-provider behavior. Its formula caveats and conflicts explain why package managers must model OpenCL loaders carefully instead of treating them as ordinary leaf packages.

### 时间线

- The OCL-dev README records the original motivation: an open source replacement for vendor-specific OpenCL ICD loaders.
- 2026-07-01: Homebrew formula metadata lists stable version 2.3.5, a conflict with `opencl-icd-loader`, and a keg-only reason tied to macOS OpenCL.framework.

### Related projects

- Related packages include KhronosGroup/OpenCL-ICD-Loader, OpenCL-Headers, POCL, GPU vendor ICDs, and distribution packages such as Debian's `ocl-icd-opencl-dev`.

### 来源

- <https://formulae.brew.sh/api/formula/ocl-icd.json>
- <https://packages.debian.org/sid/ocl-icd-opencl-dev>
- <https://raw.githubusercontent.com/KhronosGroup/OpenCL-ICD-Loader/main/README.md>
- <https://raw.githubusercontent.com/OCL-dev/ocl-icd/master/README>


## 安全说明

没有找到 ocl-icd 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: /etc/OpenCL/vendors/*.icd
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ocl-icd
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Conflicts With:** opencl-icd-loader
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** yes
- **URL Keys:** head, stable

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

- Debian apt - ocl-icd-dev - 2.3.3-1: normalized package name match | Debian stable package indexes: ocl-icd-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files to build an OpenCL ICD | https://github.com/OCL-dev/ocl-icd
- Debian apt - ocl-icd-libopencl1 - 2.3.3-1: normalized package name match | Debian stable package indexes: ocl-icd-libopencl1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Generic OpenCL ICD Loader | https://github.com/OCL-dev/ocl-icd
- Debian apt - ocl-icd-opencl-dev - 2.3.3-1: normalized package name match | Debian stable package indexes: ocl-icd-opencl-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenCL development files | https://github.com/OCL-dev/ocl-icd
- Nix - ocl-icd: normalized package name match | nixpkgs package indexes: pkgs/by-name/oc/ocl-icd/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ocl-icd-dev - 2.3.2-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: ocl-icd-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Development files to build an OpenCL ICD | https://github.com/OCL-dev/ocl-icd
- Ubuntu apt - ocl-icd-libopencl1 - 2.3.2-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: ocl-icd-libopencl1 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Generic OpenCL ICD Loader | https://github.com/OCL-dev/ocl-icd
- Ubuntu apt - ocl-icd-opencl-dev - 2.3.2-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: ocl-icd-opencl-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenCL development files | https://github.com/OCL-dev/ocl-icd
- dnf - ocl-icd - 2.3.5-1.fc45: normalized package name match | Fedora Rawhide package metadata: ocl-icd from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | OpenCL Library (Installable Client Library) Bindings | https://github.com/OCL-dev/ocl-icd/
- dnf - ocl-icd-devel - 2.3.5-1.fc45: normalized package name match | Fedora Rawhide package metadata: ocl-icd-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | OpenCL Library Development files | https://github.com/OCL-dev/ocl-icd/
- pacman - ocl-icd - 2.3.5-1: normalized package name match | Arch Linux sync databases: ocl-icd from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | OpenCL ICD Bindings | https://github.com/OCL-dev/ocl-icd
- zypper - libOpenCL1 - 2.3.4-1.6: normalized package name match | openSUSE Tumbleweed package metadata: libOpenCL1 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | OpenCL ICD Bindings | https://github.com/OCL-dev/ocl-icd
- zypper - libOpenCL1-32bit - 2.3.4-1.6: normalized package name match | openSUSE Tumbleweed package metadata: libOpenCL1-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | OpenCL ICD Bindings | https://github.com/OCL-dev/ocl-icd
- zypper - ocl-icd-devel - 2.3.4-1.6: normalized package name match | openSUSE Tumbleweed package metadata: ocl-icd-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files of ocl-icd | https://github.com/OCL-dev/ocl-icd
- zypper - ocl-icd-devel-32bit - 2.3.4-1.6: normalized package name match | openSUSE Tumbleweed package metadata: ocl-icd-devel-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files of ocl-icd | https://github.com/OCL-dev/ocl-icd


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [libtool](https://pkg.so/zh-hans/brew/libtool/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [asciidoc](https://pkg.so/zh-hans/brew/asciidoc/) - Build dependency declared by Homebrew.
- [opencl-icd-loader](https://pkg.so/zh-hans/brew/opencl-icd-loader/) - Shares pkgdb curated category or tags: cli, icd-loader, opencl, system.
- [clinfo](https://pkg.so/zh-hans/brew/clinfo/) - Shares pkgdb curated category or tags: cli, gpu, opencl, system.
- [zstd](https://pkg.so/zh-hans/brew/zstd/) - Shares pkgdb curated category or tags: cli, library, system.
- [keyutils](https://pkg.so/zh-hans/brew/keyutils/) - Shares pkgdb curated category or tags: cli, library, system.
- [libzip](https://pkg.so/zh-hans/brew/libzip/) - Shares pkgdb curated category or tags: cli, library, system.
- [hwloc](https://pkg.so/zh-hans/brew/hwloc/) - Shares pkgdb curated category or tags: cli, library, system.
- [wimlib](https://pkg.so/zh-hans/brew/wimlib/) - Shares pkgdb curated category or tags: cli, library, system.
- [libxmlb](https://pkg.so/zh-hans/brew/libxmlb/) - Shares pkgdb curated category or tags: cli, library, system.
- [appstream-glib](https://pkg.so/zh-hans/brew/appstream-glib/) - Local package facts share a topical domain. Shared terms: cli, library, system.

## Combined YAML source

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


## 来源

- pkg.so package database
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
