To check for kernel headers and install them if necessary on Oracle UEK systems, perform the following steps.

When they are properly installed, the required kernel headers are located under /usr/src/kernels/$(uname -r)/include/.

Prerequisites

Check BPF-based Sensor Requirements

Procedure

  1. To determine whether kernel headers are installed, run the following command:
    $ sudo yum list installed kernel-uek-devel-$(uname -r)

    If the package is installed, the output will be similar to the following:

    Installed Packages

    kernel-uek-devel.x86_64 <version>

  2. To determine whether the kernel headers are available to install, run the following command:
    $ sudo yum list available kernel-uek-devel-$(uname -r)

    If the package is available, the output will be similar to the following:

    Available Packages

    kernel-uek-devel.x86_64 <version> baseos

  3. To install any necessary available kernel headers, run the following command:
    $ sudo yum install -y kernel-uek-devel-$(uname -r)
  4. If the kernel headers packages are not installed and are not available, update the kernel to a supported version and install the matching kernel headers.
    Note: This action requires a reboot.
    1. To list the available kernel and kernel header packages and find matching versions, run the following command:
      $ sudo yum list available kernel-uek kernel-uek-devel

      If newer packages are available, the output will be similar to the following:

      Available Packages

      kernel-uek.x86_64 <newer-version> baseos

      ...

      kernel-uek-devel.x86_64 <newer-version> baseos

    2. To install a newer supported kernel and kernel header packages with matching versions, run the following command:
      % sudo yum install -y kernel-uek-<newer-version> kernel-uek-devel-<newer-version>
    3. Reboot into the new kernel.