欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver.

程序员文章站 2022-05-27 12:39:47
...

在运行 nvidia-smi时出现以下错误:

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver.

解决方法:

step1: 运行 “nvcc -V”

(base) [email protected]:~/Desktop$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019

step2: 运行“whereis nvidia”

(base) [email protected]:~/Desktop$ whereis nvidia
nvidia: /usr/lib/nvidia /usr/share/nvidia /usr/src/nvidia-440.33.01/nvidia

根据返回的信息,我的nvidia的版本是440.33.01

step3: 运行 “sudo apt-get install dkms”

sudo apt-get install dkms

step4: 根据step3得到的nvidia版本信息,执行以下命令

sudo dkms install -m nvidia -v 440.33.01

参考:https://www.jianshu.com/p/3cedce05a481

https://blog.csdn.net/u012114438/article/details/104425573