NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver. Make sure that the lat

2024.1.9 给新购买的4090显卡安装驱动,驱动安装完成后一直报:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running
刚开始以为是驱动安装包的问题,但是从英伟达官网下载多个不同版本的驱动安装后,执行nvidia-smi命令依然报一样的错误。

查阅大量网上资料后最后定位是 ubuntu 内核版本的问题,通过以下方案解决。

1、查看显卡硬件型号

ubuntu-drivers devices

后面有recommended的版本就是推荐安装的nvidia驱动版本号。

2、安装推荐版本,直接输入

sudo ubuntu-drivers autoinstall

3、如果不幸报错dpkg: error processing package xxx (–configure)”错误,不要着急,接着往下看。

mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
mkdir /var/lib/dpkg/info/
apt-get update
apt-get -f install
mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old/
rm -rf /var/lib/dpkg/info
mv /var/lib/dpkg/info_old/ /var/lib/dpkg/info

使用root账户执行上面的命令,然后再执行第2步即可。

4、最后重启服务器
 

相关阅读:ubuntu禁止自动更新内核_ubuntu取消内核自动更新-CSDN博客

猜你喜欢

转载自blog.csdn.net/JineD/article/details/135491404