This article is from the Frequently Asked Questions for Linux, the Free/Open Source UNIX-like operating system kernel that runs on many modern computer systems. Maintained by David C. Merrill with numerous contributions by others. (v1.0).
A: The files /usr/include/linux/ and /usr/include/asm/ are often soft links to the directories where the kernel headers are. They are usually under /usr/ src/kernel*/.
If you don't have the kernel sources, download them. Refer to the answer for How To Upgrade/Recompile a Kernel.
Then, use rm to remove any garbage, and ln to create the links:
$ rm -rf /usr/include/linux /usr/include/asm $ ln -sf /usr/src/linux/include/linux /usr/include/linux $ ln -sf /usr/src/linux/include/asm-<architecture> /usr/include/asm
The assembly language files reside in architecture-specific directories, so you need to link /usr/src/include/asm to /usr/src/linux/include/asm-i386 on PC compatible systems, to /usr/src/linux/include/asm-sparc on Sun Sparc systems, to /usr/src/linux/include/asm-ppc on PPC systems, and so on.
You'll also find that you may need to do "make config" as in a newly-unpacked kernel source tree, to create linux/autoconf.h.
 
Continue to: