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.

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

    You can find the source code of the corresponding kernel version in the openEuler code repository.

    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.
    1
    unzip /home/kernel-openEuler-22.03-LTS-SP2.zip
    
  5. Create a link.
    1
    ln -s /home/kernel-openEuler-22.03-LTS-SP2 /lib/modules/$(uname -r)/build