Home:ALL Converter>CentOS "Kernel configuration is invalid" error when building Guest Additions

CentOS "Kernel configuration is invalid" error when building Guest Additions

Ask Time:2018-11-12T14:09:38         Author:prometheusnoob

Json Formatter

I've installed CentOS through VirtualBox on my Windows 10 machine. I know that installing guest additions (devices -> Insert Guest Additions CD image) will install guest additions, but when building the guest additions I get the following error:

ERROR: Kernel configuration is invalid. include/generated/autoconfig.h or include/config/auto.conf are missing.

Run 'make oldconfig && make prepare' on kernel src to fix it

I've navigated to the /usr/src/ directory and executed the recommended commands, but I get:

make *** No rule to make target 'oldconfig'. Stop. 

Not sure where to go from here.

Author:prometheusnoob,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53256701/centos-kernel-configuration-is-invalid-error-when-building-guest-additions