当前位置:网站首页>Nvidia 显卡 Failed to initialize NVML Driver/library version mismatch 错误解决方案
Nvidia 显卡 Failed to initialize NVML Driver/library version mismatch 错误解决方案
2022-07-02 16:19:00 【u013250861】
本文记录错误 Failed to initialize NVML: Driver/library version mismatch 错误解决方案。
问题复现
$ nvidia-smi
-->
Failed to initialize NVML: Driver/library version mismatch
问题分析
- NVIDIA 内核驱动版本与系统驱动不一致
查看显卡驱动所使用的内核版本
cat /proc/driver/nvidia/version
-->
NVRM version: NVIDIA UNIX x86_64 Kernel Module 430.34 Wed Jun 26 12:19:48 CDT 2019
GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
- 内核版本 Kernel Module 为 430.34, 系统内核 16.04.12
查看系统驱动日志
cat /var/log/dpkg.log | grep nvidia
-->
2021-03-30 14:04:55 install libnvidia-compute-460-server:amd64 <none> 460.32.03-0ubuntu0.18.04.2
2021-03-30 14:04:55 status half-installed libnvidia-compute-460-server:amd64 460.32.03-0ubuntu0.18.04.2
2021-03-30 14:04:57 status unpacked libnvidia-compute-460-server:amd64 460.32.03-0ubuntu0.18.04.2
2021-03-30 14:04:57 status unpacked libnvidia-compute-460-server:amd64 460.32.03-0ubuntu0.18.04.2
2021-03-30 14:05:15 install nvidia-cuda-dev:amd64 <none> 9.1.85-3ubuntu1
2021-03-30 14:05:15 status half-installed nvidia-cuda-dev:amd64 9.1.85-3ubuntu1
2021-03-30 14:05:34 status unpacked nvidia-cuda-dev:amd64 9.1.85-3ubuntu1
2021-03-30 14:05:34 status unpacked nvidia-cuda-dev:amd64 9.1.85-3ubuntu1
2021-03-30 14:05:34 install nvidia-cuda-doc:all <none> 9.1.85-3ubuntu1
2021-03-30 14:05:34 status half-installed nvidia-cuda-doc:all 9.1.85-3ubuntu1
2021-03-30 14:05:38 status unpacked nvidia-cuda-doc:all 9.1.85-3ubuntu1
2021-03-30 14:05:38 status unpacked nvidia-cuda-doc:all 9.1.85-3ubuntu1
2021-03-30 14:05:38 install nvidia-cuda-gdb:amd64 <none> 9.1.85-3ubuntu1
2021-03-30 14:05:38 status half-installed nvidia-cuda-gdb:amd64 9.1.85-3ubuntu1
2021-03-30 14:05:39 status unpacked nvidia-cuda-gdb:amd64 9.1.85-3ubuntu1
2021-03-30 14:05:39 status unpacked nvidia-cuda-gdb:amd64 9.1.85-3ubuntu1
2021-03-30 14:05:39 install nvidia-profiler:amd64 <none> 9.1.85-3ubuntu1
2021-03-30 14:05:39 status half-installed nvidia-profiler:amd64 9.1.85-3ubuntu1
可以看到曾经安装过系统内核 18.04 的 460.32 的驱动
查看驱动程序
sudo dpkg --list | grep nvidia-*
-->
ii libnvidia-compute-460-server:amd64 460.32.03-0ubuntu0.18.04.2 amd64 NVIDIA libcompute package
ii libnvidia-container-tools 1.0.5-1 amd64 NVIDIA container runtime library (command-line tools)
ii libnvidia-container1:amd64 1.0.5-1 amd64 NVIDIA container runtime library
ii nvidia-container-runtime 3.1.4-1 amd64 NVIDIA container runtime
ii nvidia-container-toolkit 1.0.5-1 amd64 NVIDIA container runtime hook
ii nvidia-cuda-dev 9.1.85-3ubuntu1 amd64 NVIDIA CUDA development files
ii nvidia-cuda-doc 9.1.85-3ubuntu1 all NVIDIA CUDA and OpenCL documentation
- 可以看到系统安装了ubuntu 内核18.04 下的 nvidia 460 驱动
- 实际系统内核版本与驱动需求的版本不一致是问题产生的根源
解决方案
- 卸载现有驱动,重新安装
卸载驱动
sudo /usr/bin/nvidia-uninstall
sudo apt-get --purge remove nvidia-*
sudo apt-get purge nvidia*
sudo apt-get purge libnvidia*
直到命令不输出任何内容
sudo dpkg --list | grep nvidia-*
重新安装
sudo chmod a+x NVIDIA-Linux-x86_64-450.80.02.run
sudo ./NVIDIA-Linux-x86_64-450.80.02.run -no-x-check -no-nouveau-check -no-opengl-files
–no-opengl-files 只安装驱动文件,不安装OpenGL文件
–no-x-check 安装驱动时不检查X服务
–no-nouveau-check 安装驱动时不检查nouveau查看驱动更新结果
$ nvidia-smi

参考资料
https://blog.csdn.net/qq_40200387/article/details/90341107
https://www.zywvvd.com/2020/12/03/linux/driver/nvidia-driver-install-linux/
边栏推荐
- Edgenext hit a mixed punch: a lightweight architecture integrating CNN and transformer
- Unified interface for reading and writing data files in xml/json/ini and ubjson formats
- Yingguang MCU development case
- Does pytorch support 32 bits?
- Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package
- Pms150c Yingguang MCU development case
- Microsoft LDAP 配置页中输入有效的用户名及密码,microsoft ldap 配置页中输入有效的用户名
- Alibaba cloud sub account - Permission Policy - full control permission granted to an account and an OSS bucket
- 567. Arrangement in string
- Calculation of favorable comment rate
猜你喜欢

Keras深度学习实战——基于VGG19模型实现性别分类

MySQL --- 数据库的基本操作

wait_ for_ Gap -- restore archive from primary archive to secondary Archive

一个优秀程序员可抵五个普通程序员!
![[nonlinear control theory]8_ Comparison of three robust controllers](/img/a8/03ed363659a0a067c2f1934457c106.png)
[nonlinear control theory]8_ Comparison of three robust controllers

MySQL -- basic operation of database

Editor编辑器扩展在Scene View添加按钮和logo

Easyai notes - machine learning

Hbuilderx runs to the mobile phone or simulator and prompts that the device is not found

In Linux, MySQL sets the job task to start automatically
随机推荐
Simple understanding of cardinality sorting
铁塔安全监测系统 无人值守倾角振动监测系统
Typescript
Wasserstein slim gain with clipping penalty (wsgain-cp) introduction and code implementation -- missing data filling based on generating countermeasure network
一个优秀程序员可抵五个普通程序员!
finally详解
Huimang micro IO MCU ft60f010a-urt
515. 在每个树行中找最大值
Use Zadig to build a continuous delivery platform from 0 to 1
A4988与42步进电机
MySQL进阶-事务及索引
Keras深度学习实战——基于VGG19模型实现性别分类
Pfc232-sop8/14/16 should be wide-ranging and can be tape programmed with burning program
Clé de cartographie vimium
Pms150c Yingguang MCU development case
Larvel document reading notes custom authentication login and registration using larvel 8
Yingguang single chip microcomputer pms150/pmc150/pms150c consumer single chip microcomputer
aloam 代码阅读与总结
What should we pay attention to in the development process of Yingguang single chip microcomputer?
[target tracking] | data set summary