Solving CentOS system cannot find the kernel

Centos system is installed in the VirtualBox virtual machine and installation enhancements times wrong, error “centostheheadersforthecurrentrunningkernelwerenotfound……”, error because the system cannot find the kernel headers, found on the Web, original solutions for:

1)yum install gcc -y

2)yum install gcc kernel-devel kernel-headers -y

3) reboot your system

But after you follow the steps above and restart the system, enhancements are not installed. Use “yum install kernel*” and restart the system enhancements can be installed.

Therefore, the solution can be modified as follows:

1)yum install gcc -y

2) yum install kernel* /yum install kernel-devel*

3) reboot your system