Rate This Document
Findability
Accuracy
Completeness
Readability

Kernel Source Code Missing

Symptom

The analysis task fails. An error is reported indicating that the kernel header file is missing.

Possible Cause

The kernel source code is missing.

Troubleshooting Procedure

  1. Check the OS version.

    The kernel source code must match the server OS version. The following uses openEuler 22.03 LTS SP2 as an example.

    cat /etc/os-release
    Figure 1 OS information
  2. Check the OS kernel version.

    For openEuler, you can obtain the kernel source code from https://gitee.com/openeuler/kernel/tree/openEuler-22.03-LTS-SP2/.

    For other OSs, download the source package from the corresponding community website or image repository.

  3. Download the source package and upload it to the server.
  4. Decompress the source package.
    Assume that the package is in the /home directory.
    unzip /home/kernel-openEuler-22.03-LTS-SP2.zip
  5. Create a link.
    ln -s /home/kernel-openEuler-22.03-LTS-SP2 /lib/modules/$(uname -r)/build