在安装nvidia显卡驱动时遇到"Unable to find the kernel source tree"错误,cat  /var/log/nvidia-installer.log

报错原因: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.

linux内核与内核头版本不一致

  1. yum update -y 重新升级内核
  2. rpm-qa | grep kernel查看当前内核
  3. 发现缺少更新版本后的内核缺少kernel-devel文件
  4. 安装内核开发包sudo yum install kernel-devel

重新安装成功

Logo

分享最新的 NVIDIA AI Software 资源以及活动/会议信息,精选收录AI相关技术内容,欢迎大家加入社区并参与讨论。