参考一:https://blog.csdn.net/awen19921106/article/details/131331450
参考二:https://www.cnblogs.com/lishanyang/p/17326021.html
-
报错一:
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.
解决办法:
#安装内核库
yum -y install epel-release
yum -y install kernel-devel
#内核版本对比,要保持一致
rpm -qa | grep kernel
uname -r
然后执行
./NVIDIA-Linux-x86_64-440.36.run --kernel-source-path=/usr/src/kernels/3.10.0-1160.42.2.el7.x86_64 -k $(uname -r)
-
报错二:
Unable to find the kernel source tree . Unable to load the kernel module ‘nvidia.ko‘
解决办法:
uname -r 和 ls /usr/src/kernels,查看是否一致,一定要保持相同
不一致更新版本
yum update
更新后重启 reboot
-
报错三:
开机进入救援模式 “welcome to emergency mode” 的提示,需要进行修复
解决办法:重装内核
# 查看当前内核版本
uname -r
# 卸载旧内核(-r 后面为上一步查出来的内核版本)
rpm -r *kernel*
# 重启
reboot
# 安装新内核
rpm -ivh kernel-name 或者 yum update
# 重启
reboot