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

相关推荐
星马梦缘1 天前
如何切换window-ubuntu双系统【方案二】
linux·运维·ubuntu
WaiSaa1 天前
Ubuntu配置Git免密操作
git·ubuntu·gitee
星马梦缘1 天前
如何切换window-ubuntu双系统【方案一】
linux·ubuntu·双系统
醇氧1 天前
WSL 安装 Ubuntu 完整步骤(Windows 10/11 通用,极简无脑版)
linux·windows·ubuntu
酸钠鈀2 天前
AI M61SDK Ubuntu 环境搭建
linux·运维·ubuntu
Riu_Peter2 天前
【技巧】如何在 Ubuntu 中安装 .deb 软件包
linux·chrome·ubuntu
HABuo2 天前
【linux(四)】套接字编程--基于UDP协议的客户端服务端
linux·服务器·c++·网络协议·ubuntu·udp·centos
_只道当时是寻常2 天前
【Codex】Ubuntu 安装 Codex CLI 并解决 Clash 代理与账号认证问题
linux·ubuntu·chatgpt
嵌入式×边缘AI:打怪升级日志2 天前
全志T113嵌入式Linux开发环境搭建(VMware + Ubuntu 18.04)详细步骤
linux·ubuntu
Frank_refuel2 天前
终端环境下:Ubuntu 22.04.1 安装 MySQL 数据库
数据库·mysql·ubuntu