nvidia-smi指令报错:Failed to initialize NVML: Driver/library version mismatch
NVML library version: 535.113
我是刚开始没有nvidia-smi命令,输入后,提示我安装。
apt install nvidia-340 # version 340.108-0ubuntu5.20.04.2, or
apt install nvidia-utils-390 # version 390.157-0ubuntu0.20.04.1
apt install nvidia-utils-450-server # version 450.248.02-0ubuntu0.20.04.1
apt install nvidia-utils-470 # version 470.199.02-0ubuntu0.20.04.1
apt install nvidia-utils-470-server # version 470.199.02-0ubuntu0.20.04.1
apt install nvidia-utils-525 # version 525.125.06-0ubuntu0.20.04.3
apt install nvidia-utils-525-server # version 525.125.06-0ubuntu0.20.04.2
apt install nvidia-utils-535 # version 535.86.05-0ubuntu0.20.04.2
apt install nvidia-utils-535-server # version 535.54.03-0ubuntu0.20.04.1
apt install nvidia-utils-435 # version 435.21-0ubuntu7
apt install nvidia-utils-440 # version 440.82+really.440.64-0ubuntu6
apt install nvidia-utils-418-server # version 418.226.00-0ubuntu0.20.04.2
我就安装了这个apt install nvidia-utils-535 ,出现版本不一致
NVIDIA 内核驱动版本与系统驱动不一致,
输入命令
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 470.199.02 Thu May 11 11:46:56 UTC 2023
GCC version:
我这个是470的版本。
apt install nvidia-utils-470
安装之后再输入nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.199.02 Driver Version: 470.199.02 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 49C P8 N/A / N/A | 0MiB / 1878MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
我的CUDA是11.4
标签:NVML,utils,apt,version,library,install,nvidia,0ubuntu0.20 From: https://www.cnblogs.com/q1359720840/p/17744037.html