How do I install Kernel Headers?

Hello,

I am trying to install the kernel headers:

sudo yum install kernel-headers
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.jgotteswinter.com
  • epel: mirrors.telianet.dk
  • extras: mirror.eu.oneandone.net
  • updates: ftp.hosteurope.de
    Resolving Dependencies
    –> Running transaction check
    —> Package kernel-headers.x86_64 0:3.10.0-327.el7 will be installed
    –> Processing Conflict: kernel-ml-headers-4.3.3-1.el7.elrepo.x86_64 conflicts kernel-headers < 4.3.3-1.el7.elrepo
    –> Restarting Dependency Resolution with new changes.
    –> Running transaction check
    —> Package kernel-ml-headers.x86_64 0:4.3.3-1.el7.elrepo will be updated
    —> Package kernel-ml-headers.x86_64 0:4.4.3-1.el7.elrepo will be an update
    –> Processing Conflict: kernel-ml-headers-4.4.3-1.el7.elrepo.x86_64 conflicts kernel-headers < 4.4.3-1.el7.elrepo
    –> Finished Dependency Resolution
    Error: kernel-ml-headers conflicts with kernel-headers-3.10.0-327.el7.x86_64
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest

Both suggestions do not work.
Can someone hint, how to install the kernel-headers?
I need to build a kernel module for a dvb-card.

Regards,
Hendrik

Hendrik,

The installed kernel-ml-headers should already provide the headers necessary for building kernel modules. But, if you really really need kernel-headers, you can forcibly remove the kernel-ml-headers package with rpm:

rpm --nodeps -e kernel-ml-headers

Then you’ll be able to install the kernel-headers package using your preferred tool:

yum install kernel-headers

yum might complain about an rpmdb problem if you had packages installed, like glibc-headers, which depend on the kernel-headers feature (provided by kernel-ml-headers), but you can ignore any such warnings: those dependencies will be satisfied again once the kernel-headers package is installed.

-Greg

2 Likes