In this guide I will show you how to fix missing kernel-headers on CentOS 7 server. If you get the same error message like this, your CentOS 7 system might have missing kernel-header problems.
$ Error: Package: glibc-headers-2.17-106.el7_2.6.x86_64 (updates) $ Requires: kernel-headers >= 2.2.1 $ Error: Package: glibc-headers-2.17-106.el7_2.6.x86_64 (updates) $ Requires: kernel-headers $ You could try using --skip-broken to work around the problem $ You could try running: rpm -Va --nofiles --nodigest $ Error: yum install failed
SOLUTION:
To solve the missing kernel-headers problem on CentOS 7, simply run the following command to install the necessary packages.
$ yum install kernel-headers --disableexcludes=all
OTHER SOLUTIONS:
If the above solution doesn’t work well on your CentOS 7 server, you can follow other solutions below.
1.) First of all, we need to edit the yum.conf file under the /etc/ directory. Because your CentOS 7 system is most likely to exclude kernel packages, so we need to fix this.
$ nano /etc/yum.conf
2.) Please look for the exclude=kernel line, well we need to comment or delete this line.
Change from:
$ exclude=kernel*
To:
$ #exclude=kernel*
3.) Finally, let’s install kernel-headers on your CentOS 7 system.
$ yum install kernel-headers