CUDA9.1 nvidia driver 387.26 The driver installation is unable to locate the kernel source.

莫名其妙的错误 莫名其妙的解决方法,花了很多时间 记录一下


ENV: CUDA9.1 + nvidia driver 387.26 +ubuntu16_04

通过cuda9.1 runfile 安装的驱动和toolkit,添加了 启动脚本  后 正常显示   ls /dev/nvidia*   3个文件

problem:用一段时间后,以前正常的cuda程序报错, 

ls /dev/nvidia* 不见了 ,验证驱动版本  cat /proc/driver/nvidia/version  没有结果返回

(这是第二次NVIDIA driver 387.26  不翼而飞 ,第一次查了很多资料都没有解决,搞得系统快崩了 然后重装系统 重装CUDA,有老铁遇到过同样的问题,据说是CUDA9.1 runfile 自带的这个387.26 不稳定。     这次TF CAFFE OPENCV 都配好了 真的不想再换    )


重启 sudo service lightdm stop

卸载驱动:sudo ./usr/bin/nvidia-uninstall

重装驱动:报错:   

The driver installation is unable to locate the kernel source. Pleasemake sure that the kernel source packages are installed and set upcorrectly. If you know that the kernel source packages are installedand set up correctly, you may pass the location of the kernel sourcewith the '--kernel-source-path' flag.

熟悉的错误 上次就没能解决

TRY1

uname -r    ****4.13.0-37-generic    

./××.run  --kernel-source-path-=/usr/src/linux-headers-4.13.0-37-gegeric  不好使

TRY2  在国外NVIDIA 论坛找到的方法

电脑上还有4.10.0-28-generic   ,直接把当前的4.13.0-37-generic   卸了  降级内核 

1. sudo apt-get purge linux-image-4.13.0-26-generic

2. sudo apt-get purge linux-headers-4.13.0-26-generic

3.sudo update-initramfs -u

4.reboot

重启 sudo service lightdm stop

sudo ./***.run

The driver installation is unable to locate the kernel source.解决

ls /dev/nvidia*   还是没有东西

但是cat 有驱动版本号了

运行以前的CUDA 程序   可以跑  看来暂时又可以用了。

后悔没用CUDA9.0  坑越填越多

 






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值