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/.
Procedure
- 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>
- 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
- To install any necessary available kernel headers, run the following command:
$ sudo yum install -y kernel-uek-devel-$(uname -r)
- 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.
- 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
- 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>
- Reboot into the new kernel.