Help Center/ Cloud Container Engine/ FAQs/ Chart and Add-on/ Why Am I Unable to Install a NVIDIA Driver on EulerOS 2.9?
Updated on 2025-04-25 GMT+08:00

Why Am I Unable to Install a NVIDIA Driver on EulerOS 2.9?

Symptom

In EulerOS 2.9, manually installing a GPU driver without using the CCE AI Suite (NVIDIA GPU) add-on results in an error message similar to the following displayed:

ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.
 ...

Fault Locating

If an error occurs during the GPU driver installation, you can check the driver logs and determine the error cause by running the following command:

cat /var/log/nvidia-installer.log

If the command output contains the following information, the GPU driver dependencies are not installed:

...
Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel
...

Solution

You can solve this problem using either of the following methods:

  • Reinstall the GPU driver using the CCE AI Suite (NVIDIA GPU) add-on. For details, see Installing the Add-on.
  • Manually install the missing dependencies and then reinstall the GPU driver. The procedure is as follows:
    1. Install the dependencies that are missing in Fault Locating:
      yum install -y gcc gcc-c++ perl make elfutils-libelf-devel libX11 libXext binutils

      If information similar to the following is displayed, the dependencies have been installed.

      ...
      Complete!
    2. Reinstall the driver:
      ./NVIDIA-Linux-x86_64-535.54.03.run --silent --accept-license
      • If the command output does not contain ERROR, the driver has been installed. For example:
        Verifying archive integrity... OK
        ...
        WARNING: This NVIDIA driver package includes Vulkan components, but no Vulkan ICD loader was detected on this system. The NVIDIA Vulkan ICD will not function without the loader. Most distributions package the Vulkan loader; try instal1ling the "vulkan-loader", "vulkan-icd-1oaderor,""libvulkanl" package.
      • If information similar to the following is displayed in the command output, add --no-drm to the installation command:
        ERROR: Unable to load the kernel module 'nvidia-drm ko'. ...
        ERROR: The nvidia-drm kernel module failed to load. This kernel module is required for the proper operation of DRM-KMS. If you do not need to use DRM-KMS, you can try to install this driver package again with the '--no-drm' option.
        ...

        Reinstall the driver:

        ./NVIDIA-Linux-x86_64-535.54.03.run --silent --accept-license --no-drm
    3. Check whether the nvidia-smi driver can be used properly:
      nvidia-smi

      If information similar to that in the following figure is displayed, nvidia-smi can be used properly.

      Figure 1 Command output