"kernel package linux-headers-5.0.0-2173611831 is not supported" when building modules

1.9k views Asked by At

I download linux kernel-5.0.0 and try to compile and install it on my Ubuntu-18.04.3

the commands i used in /usr/src/linux-5.0:

sudo make mrproper

sudo make menuconfig

sudo make -j4

sudo make modules_install

sudo make install

but at the result of last command, there is a error:

 * 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 ]

I vim the /var/lib/dkms/nvidia/430.50/build/make.log as it suggests and I get this:

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

It seems something needed is gone. Did I miss something?

.

1

There are 1 answers

0
Catchip On

I skip these errors and just reboot. Then I change NVIDIA version from 430 to 390 and sudo make install again. It just works(in other words, no errors) even though I don't know how.