构建模块时,“不支持内核软件包linux-headers-5.0.0-2173611831”

时间:2019-10-16 05:21:27

标签: ubuntu linux-kernel dkms

我下载了Linux kernel-5.0.0,并尝试将其编译并安装在Ubuntu-18.04.3上

我在/usr/src/linux-5.0中使用的命令:

sudo make mrproper

sudo make menuconfig

sudo make -j4

sudo make modules_install

sudo make install

但在上一条命令的结果处,出现错误:

 * dkms: running auto installation service for kernel 5.0.0-2173611831          

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:

cleaning build area...(bad exit status: 2)

unset ARCH; env NV_VERBOSE=1 'make' -j4 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.0.0-2173611831 IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.0.0-2173611831/build LD=/usr/bin/ld.bfd modules...(bad exit status: 2)

ERROR (dkms apport): kernel package linux-headers-5.0.0-2173611831 is not supported

Error! Bad return status for module build on kernel: 5.0.0-2173611831 (x86_64)

Consult /var/lib/dkms/nvidia/430.50/build/make.log for more information.
                                                                         [ OK ]

我按建议显示 /var/lib/dkms/nvidia/430.50/build/make.log ,我得到了:

DKMS make.log for nvidia-430.50 for kernel 5.0.0-2173611831 (x86_64)
Wed Oct 16 13:07:33 CST 2019
Makefile:19: /Kbuild: No such file or directory
make[2]: *** No rule to make target '/Kbuild'.  Stop

似乎需要的东西不见了。我错过了什么?

1 个答案:

答案 0 :(得分:0)

我跳过这些错误,然后重新启动。然后,我将NVIDIA版本从430更改为390,然后再次进行sudo make install。即使我不知道如何,它也能正常工作(换句话说,没有错误)。