Forums

Resolved
0 votes
Hi,
After installing kernel-devel, the build link at /lib/modules/`uname -r` is broken. I have to do the following to fix it
cd /lib/modules/`uname -r`
rm -vf build
ln -s /usr/src/kernels/2.6.32-220.13.1.el6.i686 build
Thanks
Friday, May 04 2012, 04:02 PM
Share this post:
Responses (10)
  • Accepted Answer

    Friday, May 04 2012, 05:09 PM - #Permalink
    Resolved
    0 votes
    Changing your instructions to work with the x64 build as well:
    cd /lib/modules/`uname -r`
    rm -vf build
    ln -s /usr/src/kernels/`uname -r` build
    But it does not work. For the x64 kernel, the kernel-devel package does not match the kernel! The kernel version is 2.6.32-220.13.1.v6.x86_64 and the devel and headers versions are 2.6.32-220.13.1.el6.x86_64. It has been pointed out before. Hopefully a dev will respond.
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, May 05 2012, 09:30 PM - #Permalink
    Resolved
    0 votes
    It would appear the correct version is in the clearos-dev repo (remove your existing version first)
    yum --enablerepo=clearos-dev install kernel-devel-`uname -r` kernel-headers-`uname -r`
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 17 2012, 05:04 PM - #Permalink
    Resolved
    0 votes
    There is another problem. When building a kernel module (dahdi, asterisk PBX), the module will be placed at /lib/modules/2.6.32-220.13.1.el6.i686/ not /lib/modules/2.6.32-220.13.1.v6.i686/.
    To solve the problem:
    cd /lib/modules
    ln -s `uname -r` 2.6.32-220.13.1.el6.i686
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, May 17 2012, 06:13 PM - #Permalink
    Resolved
    0 votes
    @Tim,
    I filed bug 615 this morning as this is no longer working as you (or I) expect. Peter duped it to bug 586 which, if I understand correctly, will just disable the clearos-core repo. The problem is now worse as there are later el6 kernel-devel and kernel-headers packages in clearos-dev and these will now be installed by your command. We now have to be very specific with the yum install command:
    yum --enablerepo=clearos-dev install kernel-devel-`uname -r` kernel-headers-`uname -r`
    and you can no longer do a safe yum update of clearos-dev. I really wish the devs would step back and think of how they are using the repos as it is beginning to make life difficult. I would hope for a solution which allows your simple form of the yum install command to work.

    Oh, and if you already have the incorrect headers installed they may need removing first with a:
    rpm -e kernel-headers --nodeps
    as there is a dependency with another package (glibc-headers, from memory)

    [edit]
    .... and now the el6 packages have been removed and replaced with the ClearOS ones for the new 2.6.32-220.17.1.v6.x86_64 kernel released today, so we are back to normal for the moment.
    [/edit]
    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 18 2012, 10:57 AM - #Permalink
    Resolved
    0 votes
    @Sammy, please don't use symlinks between the folders as it won't work when you come to install the module. It *should* end up in the right folder if your compilation script detected the right kernel version. Check you have the right version of kernel-devel? 'rpm -qa | grep kernel'

    @Nick i've updated my post so that it is explicitly installing the same version as the running kernel. You can safely remove and reinstall glibc-headers so you don't need the --nodeps flag :)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 18 2012, 12:07 PM - #Permalink
    Resolved
    0 votes
    @Tim,
    Thanks for your help. For some reason I only received your and Peter's e-mails this morning :S It looks like things may be moving in the right direction in the repo. The el6 packages have now gone. I also wonder if clearos-dev should be enabled by default, but that may be for another discussion.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 18 2012, 12:50 PM - #Permalink
    Resolved
    0 votes
    Ah ok, no clearos-dev should not be enabled by default as it contains RPM's that have been built (by the ClearOS build system) but not necessarily tested :)

    They then get pushed to clearos-updates-testing, if OK they are then pushed to clearos-updates...

    The kernel packages will also make this path in due course...

    See the workflow documentation for more information
    http://www.clearfoundation.com/docs/developer/packaging/workflow
    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 18 2012, 01:29 PM - #Permalink
    Resolved
    0 votes
    I was not aware of the workflow. That makes sense, but then it does not make sense to me that kernel-devel and kernel-headers have not been pushed through to the updates repo in line with the kernel release.

    6.2 was released on 24/4 and the headers and devel packages are still not available in updates (and there was a further kernel update released yesterday).
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, May 22 2012, 09:23 PM - #Permalink
    Resolved
    0 votes
    I just finished installing VirtualBox 4.1 on a fresh install of Centos 6.2 using the kernel-devel from this thread. Seems to work great!
    yum --enablerepo=clearos-dev install kernel-devel-`uname -r` kernel-headers-`uname -r`

    I will post an update to the virtualbox install thread when I have it complete.
    Link to thread.

    My Problem:
    When I do a "yum update", it wants to install the "el6" version of kernel-devel so I answered "no". I can do a "yum update -x kernel-devel" which will exclude that particular package as long as the "-x" is there but "yum update" without the modifier wants to install it.

    My question(s):

    Do I need to keep kernel-devel loaded after installation or can I remove it in order to keep it from being "updated" by yum.

    Alternatively, is there a way to permanently exclude the "el6" package from updating the current "v6" package that is installed? Will anything else need to be modified to do this. I really don't want to create future problems either so I don't know if this is going to be the best course of action. Suggestions?

    FYI:
    # uname -r
    2.6.32-220.13.1.v6.x86_64

    Thanks in advance...
    Ryan
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, May 23 2012, 11:39 AM - #Permalink
    Resolved
    0 votes
    There is a bug filed (586) where I believe part of the solution (see comment on bug 615) is to disable the ClearOS Core repo as it contains non-production rpm's, including, I believe, the one you are talking about. In anticipation of this I have disabled it in /etc/yum.repos.d/clearos.repo by changing "enabled" from 1 to 0. For me this has stopped 6.2 trying to update to the el6 package.

    The rest of the solution may be to use yum-plugin-priorities or yum-plugin-protectbase.

    I believe you can also remove kernel-devel as an alternative solution.
    The reply is currently minimized Show
Your Reply