Linux kernel compilation error fatal error: linux/config.h: No such file or

  

When compiling the kernel module, because it contains #include <linux/config.h>, there is no config.h under include Linux. This file error message:

fatal error: linux/config.h: No such file or directory

Cause and solution:

Newer kernels are now deprecated With config.h, you can create this file. Execute the command (note the difference in the path):

$sudo vim /usr/src/linux-source-2.6.38/include/linux/config.h

Enter the following:

#ifndef _LINUX_CONFIG_H #define _LINUX_CONFIG_H #endif

Exit and recompile after saving, OK!

Copyright © Windows knowledge All Rights Reserved