Centos7 安装nvidia显卡驱动
参考一: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; onRed 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 thekernel 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