尝试安装 CUDA 驱动程序,“致命错误:asm/kmap_types.h:没有此文件或目录”

尝试安装 CUDA 驱动程序,“致命错误:asm/kmap_types.h:没有此文件或目录”

我已在计算机(Ubuntu 20.04)上安装了 CUDA 驱动程序。它一直在工作……直到它停止工作(不确定发生了什么)。因此,我尝试通过运行以下命令重新安装它:

sudo sh cuda_11.1.0_455.23.05_linux.run

cuda_11.1.0_455.23.05_linux.run从 NVIDIA 网站下载了此文件。但是,我收到一条错误消息,提示我查看/var/log/nvidia-installer.log以了解有关安装失败的原因的更多信息。该文件包含一条非常大的错误消息,我已将其中的一部分粘贴在下面。我不太清楚该怎么办

In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-frontend.c:13:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv.c:14:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-frontend.o] Error 1
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-dma.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-vm.o
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-vtophys.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-acpi.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-dma.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-interface.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-p2p.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-acpi.o] Error 1
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-mmap.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-mlock.o
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-p2p.o] Error 1
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-mmap.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-pci.o
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-registry.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pat.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pat.o] Error 1
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-cray.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/os-usermap.o
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-cray.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-modeset-interface.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-usermap.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-usermap.o] Error 1
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-procfs.c:15:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pci-table.o
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-procfs.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-kthread-q.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-pci.h:15,
                    from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pci.c:12:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.
   make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-pci.o] Error 1
     CC [M]  /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-memdbg.o
   In file included from /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/nvidia/nv-i2c.c:17:
   /tmp/selfgz3864/NVIDIA-Linux-x86_64-455.23.05/kernel/common/inc/nv-linux.h:119:10: fatal error: asm/kmap_types.h: No such file or directory
     119 | #include <asm/kmap_types.h>         /* page table entry lookup          */
         |          ^~~~~~~~~~~~~~~~~~
   compilation terminated.


答案1

按照邮政@ubfan1 的建议解决了这个问题

相关内容