# kernel-headers [Solved]

## aCOSwt

Hello,

I must say I know nothing at all about what the kernel-headers package is made of.

And what it is needed for.

There must be something on the web about it but I did not manage to find it.

I just managed to find posts instructing to rebuild the glibc after upgrading. But they are quite old.

- Does this thing actually needs to be upgraded ? (on a system I am happy with, I mean),

- Is it normal that its version does not match kernel's one ?

- what are the things to do after upgrading ? Rebuild glibc ? rebuild kernel ?...

Well... I am a bit... lost.   :Confused: Last edited by aCOSwt on Fri Feb 26, 2010 2:54 pm; edited 1 time in total

----------

## kukibl

 *aCOSwt wrote:*   

> 
> 
> - Does this thing actually needs to be upgraded ? (on a system I am happy with, I mean),
> 
> 

 

Since newer version is moved to stable branch it is quite safe to upgrade. You don't have to upgrade of course, I highly doubt you will ran into problems, but it is good idea since it is paineless.

 *Quote:*   

> - Is it normal that its version does not match kernel's one ?

 

Yes, AFAIK it always differs from kernel version except if you decide do build headers from your current kernel (never had need to do something like that).

 *Quote:*   

> - what are the things to do after upgrading ? Rebuild glibc ? rebuild kernel ?...

 

Just rebuild glibc and you are good to go.  :Wink: 

----------

## jkagen

If you are planning on updating your system in the future you'd better follow the recommendation. 

Run 

equery linux-headers d

to see which packages are depending on the linux-headers and should be rebuilt. The glibc is going to be

one of the packages. 

As said in the previous answer, it is quite safe, though lengthy.

Then just run revdep-rebuild. You do not need to rebuild the kernel.

----------

## kukibl

 *jkagen wrote:*   

> 
> 
> Run 
> 
> equery linux-headers d
> ...

 

Is it really required to rebuild all packages that have dependency on linux-headers?

This is Portage output after headers upgrade:

 *Quote:*   

> 
> 
> Kernel headers are usually only used when recompiling your system libc, as
> 
> such, following the installation of newer headers, it is advised that you
> ...

 

It only mentions libc...  :Confused: 

----------

## jkagen

The most important is glibc. Going through equery is the way I did it

but I think rebuilding the glibc is fine enough. 

After you rebuild it I would run revdep-rebuild, just to be sure that it works fine

----------

## kukibl

Thank you for your answer, jkagen. It is probably good practice. I see there are lots of packages depending on linux-headers (including sysvinit, util-linux and baselayout), however I didn't notice anything strange after headers upgrade.

----------

## jkagen

You're welcome. Good that the rebuild went without any problem.

----------

## aCOSwt

Thank you jkagen and kukibi for your help.

Your answers however drive me to even more questions...   :Confused: 

 *jkagen wrote:*   

> 
> 
> equery linux-headers d
> 
> to see which packages are depending on the linux-headers and should be rebuilt.

 

Believing in some typo error, I ran

equery depends -d kernel-headers

And obtained : No package found matching kernel-headers.

I then tried with linux-headers and actually obtained a list of packages amongst which the libc.

What are those linux-headers... In what does this relate to kernel-headers ?

----------

## kukibl

Package name is linux-headers. There are no kernel-headers in Portage.

```
equery d linux-headers
```

I'm not sure why it is named linux-headers instead of kernel-headers, but I think it has something to do with Gentoo/Alt (Gentoo on alternative platforms), practical reasons probably.

----------

## aCOSwt

 *kukibl wrote:*   

> Package name is linux-headers. There are no kernel-headers in Portage.

 

My bad !

Great thanks for all your explanations kubiki

----------

## jkagen

I guess there are headers files which you need during kernel and models compilation, they define structures and symbols.

----------

