1
votes

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
Didn't work. I tried: /usr/src$ sudo ln -s /usr/src/linux-headers-2.6.32-73/ /lib/modules/2.6.32-73-generic/build ln: creating symbolic link `/lib/modules/2.6.32-73-generic/build': File existsDr. Essen
Rebooted, didn't work. See, I have removed these 2.6.32-73 and 2.6.32-73-generic but kept backup. Is there any way to freshly install 2.6.32-73-generic and 2.6.32-73 linux headers? Also whenever I do sudo apt-get install linux-headers-2.6.32-73 or "linux-headers-2.6.32-74", it says its already there.Dr. Essen
Can you give an ls of your working directory?Alex44
$ ls linux-headers-2.6.32-74 linux-headers-2.6.32-74-genericDr. Essen

1 Answers

0
votes

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.