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

(base) jzzz@jzzz-System-Product-Name:~$ 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.

第一步,使用nvcc -V检查驱动和cuda。

如图发现驱动是存在的,于是进行下一步

第二步,查看已安装驱动的版本信息

ls /usr/src | grep nvidia

比如我的驱动版本是:nvidia-580.82.07

第三步,依次输入以下命令

sudo apt-get install dkms

sudo dkms install -m nvidia -v nvidia-580.82.07

出现报错

Error! Your kernel headers for kernel 6.14.0-29-generic cannot be found at /lib/modules/6.14.0-29-generic/build or /lib/modules/6.14.0-29-generic/source. Please install the linux-headers-6.14.0-29-generic package or use the --kernelsourcedir option to tell DKMS where it's located.

找到解决办法如下:

复制代码
sudo apt install linux-headers-6.14.0-29-generic

实际上我运行完,安装好后这个后,再次nvidia-smi已经成功

https://askubuntu.com/questions/1555419/ubuntu-broke-after-last-kernel-update-6-14-0-29

相关推荐
北城笑笑6 小时前
Server 18 ,Nginx + Vite 前端部署排错实战:从 `/api/gpt/chat` 404 到 9012 后端服务的完整定位过程
linux·运维·前端·nginx·ubuntu·vue
小小的木头人7 小时前
Ubuntu 20.04 离线安装最新版 Firefox 浏览器
ubuntu·firefox
时空无限20 小时前
ubuntu dpkg -l 输出第一列解释
linux·运维·ubuntu
叮咚侠1 天前
Ubuntu 24.04 安装zabbix-agent 5.0 服务
linux·ubuntu·zabbix·zabbix-agent
bosins1 天前
将 Hyper-V 上的 Ubuntu 虚拟机内容迁移到 WSL (Windows Subsystem for Linux) 中
linux·windows·ubuntu
Matt今年18岁1 天前
自动检测校园网状态,自动联网并恢复 Ubuntu 下的 ToDesk 连接
运维·服务器·开发语言·pytorch·python·ubuntu
王坊兴1 天前
Ubuntu 部署产品原型静态服务器:SFTP + Nginx
服务器·nginx·ubuntu
breeze jiang1 天前
TypeScript 工具类型怎么记:从 Pick、Omit 到 keyof 与 Exclude 推导
linux·ubuntu·typescript
运维全栈笔记1 天前
Ubuntu 24.04 Certbot 自动化SSL证书配置指南
linux·运维·服务器·nginx·ubuntu·自动化·ssl
我是小灰灰吖1 天前
Qt 6.9.3 Ubuntu 22.04 虚拟键盘显示问题全记录与解决方案
linux·qt·ubuntu