This discussion is archived
10 Replies Latest reply: Sep 20, 2013 2:33 AM by Dude! RSS

linux kernel headers out of sync

osde8info Newbie
Currently Being Moderated

after the latest yum updatethe  kernel does not match headers and i see

 

# yum list kernel*
Loaded plugins: refresh-packagekit, security
Installed Packages
kernel.x86_64                        2.6.32-358.el6                  @anaconda-OracleLinuxServer-201302251503.x86_64/6.4
kernel.x86_64                        2.6.32-358.6.2.el6              @ol6_latest                                       
kernel.x86_64                        2.6.32-358.11.1.el6             @ol6_latest                                       
kernel-devel.x86_64                  2.6.32-358.6.2.el6              @ol6_latest                                       
kernel-devel.x86_64                  2.6.32-358.11.1.el6             @ol6_latest                                       
kernel-firmware.noarch               2.6.32-358.11.1.el6             @ol6_latest                                       
kernel-uek-headers.x86_64            2.6.32-400.29.1.el6uek          @ol6_latest     

                                 
Available Packages
kernel-debug.x86_64                  2.6.32-358.11.1.el6             ol6_latest                                        
kernel-debug-devel.x86_64            2.6.32-358.11.1.el6             ol6_latest                                        
kernel-doc.noarch                    2.6.32-358.11.1.el6             ol6_latest                                        
kernel-headers.x86_64                2.6.32-358.11.1.el6             ol6_latest        

 

how do i uninstall

kernel-uek-headers.x86_64        2.6.32-400.29.1.el6uek

and reinstall

kernel-headers.x86_64            2.6.32-358.11.1.el6


  • 1. Re: linux kernel headers out of sync
    WadhahDAOUEHI Journeyer
    Currently Being Moderated

    Hi,

    To uninstall kernel-uek-headers.x86_64


         # yum remove kernel-uek-headers


    and to reinstall kernel-headers.x86_64


       # yum remove kernel-headers

       # yum install kernel-headers

    or

       # yum update kernel-headers


    I hope this can help you

    Best Regards

  • 2. Re: linux kernel headers out of sync
    osde8info Newbie
    Currently Being Moderated

    thanks for trying to help but i'm afraid that hasnt worked

     

    yum remove kernel-uek-headers

    uninstalls gcc which i didnt want to do and


    yum remove kernel-uek-headers

    just says Package(s) kernel-headers available, but not installed.

     


     

    Dependencies Resolved

     

    ==================================================================================================

    Package                   Arch          Version                         Repository          Size

    ==================================================================================================

    Removing:

    kernel-uek-headers        x86_64        2.6.32-400.29.1.el6uek          @ol6_latest        2.2 M

    Removing for dependencies:

    gcc                       x86_64        4.4.7-3.el6                     @ol6_latest         19 M

    glibc-devel               x86_64        2.12-1.107.el6                  @ol6_latest        966 k

    glibc-headers             x86_64        2.12-1.107.el6                  @ol6_latest        2.0 M

     

    Transaction Summary

    ==================================================================================================

    Remove        4 Package(s)

     

     

    # yum update kernel-headers

    Loaded plugins: priorities, security

    Setting up Update Process

    Package(s) kernel-headers available, but not installed.

    No Packages marked for Update

  • 3. Re: linux kernel headers out of sync
    WadhahDAOUEHI Journeyer
    Currently Being Moderated

    Hi,

    It's clear that kernel-header is not installed,

    # yum update kernel-headers

    Loaded plugins: priorities, security

    Setting up Update Process

    Package(s) kernel-headers available, but not installed.

    No Packages marked for Update

    so try to install it with:

     

    # yum install kernel-headers


    I hope this can help you

    Best Regards

  • 4. Re: linux kernel headers out of sync
    Dude! Guru
    Currently Being Moderated

    Kernel header files are backwards compatible. Package kernel-headers is obsoleted by kernel-uek-headers.

     

    Check the following:

     

    # yum install kernel-headers

    Package kernel-headers is obsoleted by kernel-uek-headers, trying to install kernel-uek-headers-2.6.32-400.29.1.el6uek.x86_64 instead

     

    What are you actually trying to fix?

  • 5. Re: linux kernel headers out of sync
    osde8info Newbie
    Currently Being Moderated

    i just want the correct headers for my kernel 2.6.32-358.11.1.el6 and not a newer version 2.6.32-400.29.1.el6uek

    is that possible ?

  • 6. Re: linux kernel headers out of sync
    Dude! Guru
    Currently Being Moderated

    The UEK kernel is the default kernel since Oracle Linux 5.6 and 6.0 and has been tested to work with Oracle products. There is apparently no reason to install the original RHEL kernel-headers package. Your kernel header data is not out of sync. Also, your /etc/sysctl/kernel file has kernel-uek defined as the default kernel. What you are trying to accomplish is technically possible, but why bother? I would not do it for only cosmetic reasons:

     

    # yum remove kernel-uek-headers

     

    # wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/kernel-headers-2.6.32-358.11.1.el6.x86_64.rpm

     

    # rpm -Uvh kernel-headers-2.6.32-358.11.1.el6.x86_64.rpm

  • 7. Re: linux kernel headers out of sync
    osde8info Newbie
    Currently Being Moderated

    i think theres some confusion going on here i dont mind about using the uek

     

    i just want my kernel and headers to match

    ie

    2.6.32-358.11.1.el6uek and 2.6.32-358.11.1.el6uek

    or

    2.6.32-400.29.1.el6uek and 2.6.32-400.29.1.el6uek

     

    and NOT a mixture of

     

    2.6.32-358.11.1.el6 and 2.6.32-400.29.1.el6uek

     

    if this is not possible i can always switch to another distro that can provide matching kernel and headers

  • 8. Re: linux kernel headers out of sync
    Dude! Guru
    Currently Being Moderated

    The kernel-headers packages are installed into /usr/include/... You cannot install two or more different versions of kernel-headers at the same time. If you want kernel-headers and kernel to match exactly you need to uninstall and reinstall the kernel-header packages depending on the kernel you use, or simply use one version of the kernel only. This could probably be addressed by software design, but is something that needs to be addressed by the Linux developers.

     

    Since kernel-uek-headers obsoletes kernel-headers I do not understand your concern, at least not for technical reasons. What bothers you about the version mixture of kernel and kernel-headers? Sorry, but what you are trying to accomplish does not seem to be worth the effort or have a valid reason. If you do not care about the UEK kernel or Linux distribution, why using Oracle Linux, and not RHEL instead?

  • 9. Re: linux kernel headers out of sync
    osde8info Newbie
    Currently Being Moderated

    i have now switched to UEK as you suggest and

     

    yum list kern* now says

     

    kernel-uek.x86_64               2.6.39-400.109.1.el6uek    @ol6_UEK_latest                              
    kernel-uek-devel.x86_64         2.6.39-400.109.1.el6uek    @ol6_UEK_latest                              
    kernel-uek-firmware.noarch      2.6.39-400.109.1.el6uek    @ol6_UEK_latest                              
    kernel-uek-headers.x86_64       2.6.32-400.29.1.el6uek     @ol6_latest

     

    but virtualbox additions install still gives an error

     

    Installing additional modules ...

    Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]

    Building the VirtualBox Guest Additions kernel modules

    The headers for the current running kernel were not found. If the following

    module compilation fails then this could be the reason.

    The missing package can be probably installed with

    yum install kernel-uek-devel-2.6.39-400.109.1.el6uek.x86_64

     

    but when i try and install the correct headers kernel-uek-headers-2.6.39-400.109.1.el6uek.x86_64

    i get another error

     

    # yum install kernel-uek-headers-2.6.39-400.109.1.el6uek.x86_64

    Loaded plugins: priorities, security

    Setting up Install Process

    No package kernel-uek-headers-2.6.39-400.109.1.el6uek.x86_64 available.

     

    SO my kernel and my headers STILL do not match EVEN after switching to UEK !

  • 10. Re: linux kernel headers out of sync
    Dude! Guru
    Currently Being Moderated

    You have upgraded your kernel to the UEK2 kernel (2.6.39).

     

    We could have saved the whole discussion about kernel-header matching if you had previously explained what you are trying to accomplish. Your kernel and kernel-header version do not have to match and the notice you see about a kernel-header mismatch by the VirtualBox Guest Additions installer is not an error and therefore is benign.

     

    su - root
    yum install gcc kernel-uek-devel-$(uname -r)
    
    
    
    

     

    Unless you have meanwhile screwed up your system by trying to fix what isn't a problem, the VirtualBox Guest Addition installer will still show you the notice about a kernel-header mismatch, but the installation should finish successfully. I've done it hundreds of times.

     

    Actually, the installer does not even need the kernel-headers. Here is a previous link addressing the very same issues:

     

    Versions mismatch of kernel-uek kernel-uek-headers kernel-uek-devel

    https://forums.oracle.com/thread/2428868

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points