Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just installed a new kernel for my Slackware 10.0, 2.6.7, and I removed all of the old kernel 2.4.26 stuff including the headers. Now, programs won't compile because I have no headers. How do I get the headers for my new 2.6.7 kernel?
Create a symbolic link called /usr/src/linux, pointing to the actual kernel source root directory. Say, something along these lines: ln -s /usr/src/linux-2.6.7 /usr/src/linux
Kernel headers are include files that define functions that some programs that interact closely with the kernel use.
Create a symbolic link called /usr/src/linux, pointing to the actual kernel source root directory. Say, something along these lines: ln -s /usr/src/linux-2.6.7 /usr/src/linux
I already did that... that's not what the headers are. That's the source code. I'm talking about the files in /usr/include/linux. I just did some test to see exactly what was going wrong and this is what I got. Programs compiled successfully before I did anything (obviously). Then, when I compiled the 2.6.7 kernel they still compiled successfully. Then, I uninstalled the all of the old kernel stuff and the programs would not compile. Then, I reinstalled the 2.4.26 headers and they compiled again. So it seems that the 2.4.26 headers are working with the 2.6.7 kernel somehow. Is this safe to do? And none of you answered my question about how to get the 2.6.7 kernel headers.
/usr/src/linux/include/linux and /usr/src/linux/include/asm(pick one, if not sure, then generic should work fine)
this assumes /usr/src/linux is a symlink to the 2.6.7 tree, but be warned, some programs might get errors if you compile against different source headers
just override the headers in /usr/include/linux and /usr/include/asm
those should not be symlinks, if they are, remove them
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.