ocloc command not found

In this troubleshooting guide we learn how to fix ocloc command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

ocloc: command not found

or when using sudo you get the following error message

sudo: ocloc: command not found

Solutions to ocloc: command not found

How To Fix ocloc: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ocloc is provided by intel-opencl-icd package.

intel-opencl-icd is:

The Intel(R) Graphics Compute Runtime for OpenCL(TM) is a open source project to converge Intel’s development efforts on OpenCL(TM) compute stacks supporting the GEN graphics hardware architecture.

Supported platforms:

  • Intel Core Processors with Gen8 GPU (Broadwell) - OpenCL 2.1
  • Intel Core Processors with Gen9 GPU (Skylake, Kaby Lake, Coffee Lake) - OpenCL 2.1
  • Intel Atom Processors with Gen9 GPU (Apollo Lake, Gemini Lake) - OpenCL 1.2
  • Intel Core Processors with Gen11 GPU (Ice Lake) - OpenCL 2.1

To fix this problem, we can install more using the command below.

sudo apt-get -y install intel-opencl-icd

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install intel-opencl-icd.

sudo apt -y install intel-opencl-icd

Or if you have aptitude installed you can use the following command.

sudo aptitude install intel-opencl-icd

Summary

In this tutorial we learn how to fix ocloc command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.