Unable to 'make' for Hello World, failed to fetch kernel headers

234 views Asked by At

I am running a simple hello world program from http://www.tldp.org/LDP/lkmpg/2.6/html/hello2.html

But I am getting error "make: * /lib/modules/2.6.32-73-generic/build: No such file or directory. Stop. make: * [all] Error 2"

Earlier I was getting error "bounds.h not found" which found to be missing when I searched. Then I tried "make prepare" from the linux-headers-2.6.32-73-generic source directory. but failed. Then I did

sudo apt-get update
sudo apt-get dist-upgrade

No success. Then I installed next release linux-headers-2.6.32-74, so I am having now 4 directories- linux-headers-2.6.32-73, linux-headers-2.6.32-73-generic, linux-headers-2.6.32-74 and linux-headers-2.6.32-74-generic.

Can anyone help me how to make it the new one as default library so that I can load my module "Hello world".

1

There are 1 answers

0
Dr. Essen On

The solution:

On observing the changelogs of linux-headers-2.6.32-73-generic and linux-headers-2.6.32-74-generic, there were no any changes in the bounds.h file in the later version. I just inserted my bounds.h file into the corresponding directory and it worked.

All errors got removed and modules can be loaded successfully.