Search code examples
centosopenclyum

Unbale to install OpenCL in CentOS 7


I'm trying to install OpenCL in a CentOS 7.9 system following instructions here, but yum is unable to find the opencl-headers package as shown in my command-line output below. I tried enabling all repos as instructed here, but no luck. Can anyone help? It seems I need to point yum to the correct registry where it can find the OpenCL files. If that's correct, how do I do that? Thanks.

$ yum install opencl-headers

Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.metrocast.net
 * centos-kernel: mirror.math.princeton.edu
 * centos-kernel-experimental: mirror.pit.teraswitch.com
 * centosplus: centos.mirror.constant.com
 * extras: distro.ibiblio.org
 * fasttrack: mirrors.wcupa.edu
 * updates: centos.mirror.constant.com
No package opencl-headers available.

Solution

  • opencl-headers package for CentOS 7 is a part of Extra Packages for Enterprise Linux (EPEL) repository. And this repository is not added by default, you need to add it manually. For example, using following command:

    yum install epel-release
    

    after that you will be able to install OpenCL headers using yum command

    yum install opencl-headers