ERROR: Unable to find the kernel source tree for the currently running kernel - CentOS / RHEL

This article will provide you with an information on how to install kernel source on CentOS/RHEL Linux system. Alternatively it will guide you through a simple troubleshootng process in case you have already installed kernel sources/headers and yest still receiving the bellow error message:


This is a companion discussion topic for the original entry at https://linuxconfig.org/error-unable-to-find-the-kernel-source-tree-for-the-currently-running-kernel-centos-rhel