1、说明
系统:
centos7.2
cuda版本:
9.0
报错信息:
在执行.run文件后报错
# sh cuda_9.0.176_384.81_linux.run
The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly.
If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag.
2、解决问题
2.1、发现内核版本和kernel-devel版本不一致
# uname -r
3.10.0-327.el7.x86_64
# rpm -q kernel-devel kernel-headers
kernel-devel-3.10.0-957.1.3.el7.x86_64
kernel-headers-3.10.0-862.3.2.el7.x86_64
2.2、下载kernel-headers的安装包,保持和内核版本的版本一样
# rpm -ev kernel-headers-3.10.0-862.3.2.el7.x86_64
# rpm -ivh kernel-devel-3.10.0-327.el7.x86_64.rpm
再次运行安装文件,成功。
转载于:https://blog.51cto.com/xiaoxiaozhou/2344649