赞
踩
错误提示:
ERROR An error occurred while performing the step: "Building kernel modules". See /var/log/nvidia-installer.log for details.
ERROR: The nvidia kernel module was not created.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find
suggestions on fixing installation problems in the README available
on the Linux driver download page at www.nvidia.com.
错误图下图:
通过检查/var/log/nvidia-installer.log文件发现,其中930行到940行说了错误的原因是gcc版本不匹配
使用gcc -v指令查看当前系统中gcc的版本,可以发现确实是gcc-11,那么接下来就安装gcc-12
使用指令
sudo apt install gcc-12
来安装gcc-12
安装好后使用gcc -v会发现gcc版本没切换过来,一定要手动切换,参考这篇Ubuntu 切换GCC版本来切换gcc版本即可
切换完后大功告成
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。