Error message during compiling kernel modules /lib/modules/<kernel_version>/build/include/../.config: No such file or directory


To compile the kernel modules the Makefiles assume that the directory /lib/modules//build
exists or is a symbolic link to the source of the kernel you are using. (The term is used here to
represent the version number of the kernel you are using e.g. 2.4.18-14). This is (apparently)
the method recommended by Linus Torvalds (!).
Most distributions will be installed with this link in place. If not, the problem can be solved like this.....

- Make sure you have the source code for the kernel version you are using installed.
This is sometimes an rpm that needs to be installed explicitly from the CDs.
After installation you should have a directory called /usr/src/.
Most distributions will create the missing link to the kernel sources when you install
the correct package (e.g. RedHat 8.0). If not, please follow the instructions below:

The kernel source directory will be called in the instructions below.
Please enter the correct directory for your system whenever this is used.

- You should also have a file describing the configuration of your kernel.
This is the .config file and will be found in .
If you don"t have this file then you won"t be able to compile kernel modules
because we need to know a bit about your kernel configuration.

If the file is not there you might be able to generate it by copying and unpacking the file
/proc/config.gz and then renaming it to .config and copying it to (e.g. SuSE kernels).
Sometimes it is just necessary to follow the next steps
and this file will be created for you from the defaults (e.g. on RedHat 8.0).

- Change to the directory and type make menuconfig.
Don"t change any configuration options - just exit the program, saving the configration file.

- Now type make dep to create the auto-dependency list and the file autoconf.h.

- Create a symbolic link to the kernel source directory like this if it does not already exist:

cd /lib/modules/
ln -s build

- Now you should be able to recompile the MATRIX VISION kernel modules correctly for your system.

Go back