NVIDIA 驱动安装失败问题排查与解决(含离线 GCC 工具链安装全过程)
一、问题背景
在某台 无网络访问能力的 Ubuntu 22.04 服务器(型号为 xxxxx G5500 V7)上,尝试安装 NVIDIA 官方驱动(NVIDIA-Linux-x86_64-570.124.04.run)时,安装过程报错,无法完成驱动安装,且 nvidia-smi 命令提示找不到。
二、问题现象
-
执行
nvidia-smi提示命令不存在; -
执行驱动安装脚本时提示:
ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most frequently when the kernel module was built against the wrong or improperly configured kernel sources -
查看
/var/log/nvidia-installer.log日志,发现以下关键错误:ERROR: The kernel module failed to load. Please check the output of `dmesg | grep nvidia` for more information.ERROR: unable to find the kernel source tree for the currently running kernel.ERROR: unable to determine the path to install the libglx.so module -
查看
dmesg | grep nvidia,发现如下信息:nvidia: module verification failed: signature and/or required key missing - tainting kernel. nvidia: Unknown symbol __asan_version_mismatched (err -2) nvidia: Unknown symbol __tsan_func_entry (err -2)
三、初步分析
从日志来看,驱动安装失败的主要原因集中在以下几点:
- 缺少编译工具链:驱动需要编译内核模块,但系统缺少
gcc,g++,make等工具; - 缺少编译依赖库:驱动安装脚本提示找不到
libglx.so等文件; - 内核模块加载失败:日志中出现
__asan_version_mismatched和__tsan_func_entry错误,表明缺少libasan8和libtsan2; - 系统环境不一致:早期可以正常使用
nvid

&spm=1001.2101.3001.5002&articleId=149453873&d=1&t=3&u=ae056515c6ba43f188a052e640f2f1cc)
2万+

被折叠的 条评论
为什么被折叠?



