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

相关推荐
橘子编程2 小时前
JavaScript与TypeScript终极指南
javascript·ubuntu·typescript
12345,catch a tiger4 小时前
虚拟机ubuntu安装Vmware Tools
linux·运维·ubuntu
辰风沐阳4 小时前
OpenClaw 安装教程(Ubuntu 24.04 Desktop)
linux·ubuntu
六点的晨曦7 小时前
VMware安装Ubuntu的记录
linux·ubuntu
问简8 小时前
ubuntu 字体相关问题
运维·服务器·ubuntu
明月醉窗台9 小时前
[jetson] AGX Xavier 安装Ubuntu18.04及jetpack4.5
人工智能·算法·nvidia·cuda·jetson
沐雪轻挽萤10 小时前
无人系统:Ubuntu 操作系统全景架构与实战工程指南
linux·运维·ubuntu
corpse201011 小时前
VirtualBox 安装ubuntu-25 ,配置SSH工具登录
linux·ubuntu·ssh
YYYing.13 小时前
【Linux/C++网络篇(一) 】网络编程入门:一文搞懂 TCP/UDP 编程模型与 Socket 网络编程
linux·网络·c++·tcp/ip·ubuntu·udp
魔都吴所谓13 小时前
【Ubuntu】22.04安装 CMake 3.24
linux·运维·ubuntu