背景
GPU服务器突然之间
nvidia-smi
命令失效了,报错信息如下:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
问题出现了,不要慌,按照下面步骤你会有收获。
解决方案
1、查看已安装驱动的版本信息
ls /usr/src | grep nvidia
查看驱动的版本。
2、查看显卡硬件型号
ubuntu-drivers devices
推荐安装的版本号是:后面又recommended的版本。
3、同意安装推荐版本,直接输入
sudo ubuntu-drivers autoinstall
4、如果不幸报错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账户执行上面的命令,然后再执行第3步即可。
好了,问题已经基本解决,这时候你会惊讶的说,还没成功啊?关键一步,需要重启服务器就可以了。恭喜你!