如何解决 nvidia 驱动程序安装过程中出现“正在构建内核模块”的问题?

如何解决 nvidia 驱动程序安装过程中出现“正在构建内核模块”的问题?

我的电脑有一个RTX2080 ti外置显卡,基于Ubuntu 18.04。

我在尝试着:

安装CUDA 10.0,以及对应的显卡驱动410.57才能使用tensorflow gpu。

我确实chmod + x NVIDIA-Linux-x86_64–410.57.run获得了执行运行文件的权限。

我执行了使用sudo ./NVIDIA-Linux-x86_64–410.57.run — no-x-check

ERROR: An error occurred在执行此步骤时得到了此信息:“构建内核模块”

我该如何解决它?

请参阅下面的日志文件:

/var/log/nvidia-installer.log

---------------------------------------------
/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/linux_nvswitch.c:1582:5: error: implicit declaration of function ‘time_to_tm’; did you mean ‘time64_to_tm’? [-Werror=implicit-function-declaration]
     time_to_tm(time_nsec / NVSWITCH_NSEC_PER_SEC, 0, &t);
     ^~~~~~~~~~
     time64_to_tm
/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/nvlink_linux.c: In function ‘nvlink_sleep’:
/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/nvlink_linux.c:570:5: error: implicit declaration of function ‘do_gettimeofday’; did you mean ‘efi_gettimeofday’? [-Werror=implicit-function-declaration]
     do_gettimeofday(&tm_aux);
     ^~~~~~~~~~~~~~~
     efi_gettimeofday
cc1: some warnings being treated as errors
scripts/Makefile.build:284: recipe for target '/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/os-interface.o' failed
make[2]: *** [/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/os-interface.o] Error 1
cc1: some warnings being treated as errors
scripts/Makefile.build:284: recipe for target '/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/nvlink_linux.o' failed
make[2]: *** [/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/nvlink_linux.o] Error 1
cc1: some warnings being treated as errors
scripts/Makefile.build:284: recipe for target '/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/linux_nvswitch.o' failed
make[2]: *** [/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel/nvidia/linux_nvswitch.o] Error 1
make[2]: Target '__build' not remade because of errors.
Makefile:1606: recipe for target '_module_/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel' failed
make[1]: *** [_module_/tmp/selfgz27588/NVIDIA-Linux-x86_64-410.57/kernel] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-23-generic'
Makefile:79: recipe for target 'modules' failed
make: *** [modules] Error 2
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.
                                                                                               1352,1        Bot

相关内容