DebianThis forum is for the discussion of Debian Linux.
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 need to recompile my kernel. If I install a new linux-image from the Debian repository will I need to install the corresponding linux-header package as well?
I need to recompile my kernel. If I install a new linux-image from the Debian repository will I need to install the corresponding linux-header package as well?
I have always got varied answers for this question. Personally even I would also like to know what is the answer. My guess is that if you are going to do some development work (driver writing) then you will require those..
People can correct me if I am completely off the topic..
The kernel headers are only needed when you're using a stock kernel and you want to compile a new driver module or such that links directly with the kernel. This is because the distro maintainers deliberately separate the kernel and its headers into separate packages.
If you compile your own kernel from source then you do not need to worry about headers because they are created and installed by the default compiling process.
Note also that the "linux-image" packages are the pre-compiled stock kernels. If you want to compile your own you'll need to install one of the "linux-source" packages (which basically just deposits a source tarball into /usr/src), or get the latest source from kernel.org or something.
Thanks. My reason for asking is that I am going to compile a new all-in-one printer driver. So have I got this right? I need to install a linux-source package but not the corresponding linux-header package.
That is still "old" but none the less the steps are the same for compiling a kernel today you need to configure the source tree via the make menuconfig or whichever of the graphical frontends that can be used. You of course need to know what the hardware is in your machine so that you pick the correct modules to compile to have support for everything available. Just what support do you need so you have to compile your own kernel anyways?
Location: East Coast, USA (in "the great northeast")
Distribution: Custom / from source; Fedora, Debian, CentOS, Scientific; LFS.
Posts: 94
Rep:
Quote:
Originally Posted by mikieboy
I need to recompile my kernel. If I install a new linux-image from the Debian repository will I need to install the corresponding linux-header package as well?
I'm not exactly sure which you're asking; are you going to recompile the kernel or just grab another .deb from somewhere and install it?
The answer, either way, to "if I replace my kernel with a different version, do I need to replace the kernel headers too" is "yes". You need them (the headers) for a number of reasons; one of the more common is for building kernel modules out-of-tree.
If you're going to compile your own kernel, then you're probably going to create a linux-headers package at the same time you create your linux-kernel package. You have to install them separately, but you can build them at the same time.
Are you trying to use a kernel from a different release (for example, an "unstable" kernel on "etch" ("stable")), or ??? Or are you getting the kernel from backports.org or another 3rd party repository?
Like I said, I'm not completely clear on what it is that you're trying to do...
My old printer was a parallel port Epson and my new HP one is USB. My existing kernel doesn't seem to have USB printer support enabled as I get a "no device found" message when I try to use the printer with the generic driver. At least I think that's the problem, only one way to find out!
I also need to compile the latest HPLIP printer driver if I want full support for all the printer's features as the debian HPLIP driver doesn't support this latest model. The new driver is available from HP but as a tarball not a .deb.
My old printer was a parallel port Epson and my new HP one is USB. My existing kernel doesn't seem to have USB printer support enabled as I get a "no device found" message when I try to use the printer with the generic driver. At least I think that's the problem, only one way to find out!
Try running the command using your config-??? to see what it says and you might want to try it for hiddev although I can't see them having left that out as it is needed for a lot of things connect to a USB port.
Quote:
I also need to compile the latest HPLIP printer driver if I want full support for all the printer's features as the debian HPLIP driver doesn't support this latest model. The new driver is available from HP but as a tarball not a .deb.
I can see you needing to do do that for it to work properly then. Have you looked at the output of the dmesg command after having plugged in the printer to the usb port to see if it is detected?
The version of the kernel headers package which should be present on your machine is the version which was installed at the same time as your glibc package.
You shouldn't upgrade either glibc or linux-headers without also upgrading the other at the same time.
Linus says it best: "The fact is, that the header files should match the library you link against, not the kernel you run on."Link
The version of the kernel headers package which should be present on your machine is the version which was installed at the same time as your glibc package.
You shouldn't upgrade either glibc or linux-headers without also upgrading the other at the same time.
Linus says it best: "The fact is, that the header files should match the library you link against, not the kernel you run on."Link
Well thats all well and good if that was the actual header files being discussed here what you speak of is the linux-libc-dev package. The ones in question for this purpose would be linux-headers-2.6.???? with the ???? matching the running kernel so you can build kernel modules against them then module will match the running kernel when modprobe'd, although I doubt the OP even needs any of these headers files for when he tries compile the HPLIP driver probably will need the cups development packages.
Code:
acsh linux-libc-dev
Package: linux-libc-dev
Priority: optional
Section: devel
Installed-Size: 4040
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Architecture: amd64
Source: linux-2.6
Version: 2.6.22-3
Replaces: linux-kernel-headers
Provides: linux-kernel-headers
Conflicts: linux-kernel-headers
Filename: pool/main/l/linux-2.6/linux-libc-dev_2.6.22-3_amd64.deb
Size: 698506
MD5sum: 0c9963f7115c626702953032352f5e49
SHA1: 66ab13424a87d9cf052131a504805a048d7491e1
SHA256: 043527ac81eabda1857c693ce0bf3fccccb92c8b5b5b3e14c7aba35fe012c5e0
Description: Linux Kernel Headers for development
This package provides headers from the Linux kernel. These headers are
used by the installed headers for GNU glibc and other system libraries.
Well thats all well and good if that was the actual header files being discussed here what you speak of is the linux-libc-dev package. The ones in question for this purpose would be linux-headers-2.6.????
In that case both the linux-libc-dev headers and the linux-headers-2.6 should match the glibc version.
See:
Code:
Package: linux-libc-dev
..
These headers are used by the installed headers for GNU glibc and other system libraries.
In that case both the linux-libc-dev headers and the linux-headers-2.6 should match the glibc version.
See:
Code:
Package: linux-libc-dev
..
These headers are used by the installed headers for GNU glibc and other system libraries.
I fail to see what point you are trying to make here the likelyhood of something like that happening on a Debian system are next to nil if using it properly. In order to get in that situation you would need to force the install of a package on a branch of Debian it was not built for or get caught in the middle of a libc6 (glibc on Debian) transition from unstable down to testing or mixing stable with testing/unstable. Anyways we are filling up buddies thread with this when it is not relevant to the problem at hand...
I couldn't find any instance of linux-headers installed on my system. Maybe my (very recent) upgrade from Etch to Lenny could be responsible for anything that's gone missing. Could the lack of headers cause the "no device found" message? BTW I'm running the Debian 2.6.21-2-k7 linux-image.
I'm afraid the glibc discussion has gone a bit over my head. Wouldn't "apt-get dist-upgrade" have sorted dependencies out?
I couldn't find any instance of linux-headers installed on my system. Maybe my (very recent) upgrade from Etch to Lenny could be responsible for anything that's gone missing. Could the lack of headers cause the "no device found" message? BTW I'm running the Debian 2.6.21-2-k7 linux-image.
I'm afraid the glibc discussion has gone a bit over my head. Wouldn't "apt-get dist-upgrade" have sorted dependencies out?
No if you never went out of your way to install the headers then they would not have been there to start with. Have you checked with the dmesg command to see if it is detected during boot/after you turn it on like I suggested? If so and it is seen then it most likely is the case that you need the new hplip driver compiled for your install. Also do you have a URL for the location of this new driver and since you do not mention what is the model number of the printer?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.