{kb-symptom}
It is common place for system administrators to not want to reboot their machine and rightfully so. You might find yourself in a situation where you don’t’ have the latest version of the kernel and {{yum}} isn’t giving you the kernel-devel package that you need to build the {{r1soft hcpdriver}}.
{kb-cause}
The system has an older kernel but you are not ready to upgrade it, but the kernel-devel package for your running kernel is not available in the standard CentOS repository.
{kb-resolution}
You may have a kernel that is no longer in the repository. If this is the case you can find all of the older packages at [http://vault.centos.org|http://vault.centos.org/]. The first step is to ascertain what version of Centos you are running, to do so please see the command below.
{code}
[root@centos~]# cat /etc/redhat-release
CentOS release 5.6 (Final)
{code}
In this example the version is CentOS 5.6. By default your installation should include an entry for the vault repository located at /etc/yum.repos.d/CentOS-Vault.repo
The file for the repository has 4 entries for each of the previous versions one for the base, updates, centosplus, and extras. For the sake of brevity in our example we just include the entries for 5.6 in our example. The goal is to enable each of these so that yum can install the packages you need for your version. To do so we will find the enable line and change the value from 0 to 1.
{code}
enabled=0
{code}
{code}
enabled=1
{code}
To make the changes open up your favorite editor and make the change the enable line for the base, and updates entries in the repository. Once you have completed this it will look like the example below.
{code}
[root@centos~]# nano /etc/yum.repos.d/CentOS-Vault.repo
{code}
{code}
[C5.6-base]
name=CentOS-5.6 - Base
baseurl=http://vault.centos.org/5.6/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
[C5.6-updates]
name=CentOS-5.6 - Updates
baseurl=http://vault.centos.org/5.6/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
{code}
In some cases an entry for your version may not exist in the CentOS-Vault.repo file, however you can edit the file to add the entries you need. The process involves adding new entries in the repo file including your version number from the template below.
{code}
[C(Your Version Number)-base]
name=CentOS-(Your Version Number) - Base
baseurl=http://vault.centos.org/(Your Version Number)/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
[C(Your Version Number-updates]
name=CentOS-(Your Version Number) - Updates
baseurl=http://vault.centos.org/(Your Version Number)/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
{code}
Once you have made the changes to the CentOS-Vault.repo you can try installing your kernel headers with shell expansion.
\\
{code}
[root@centos~]# yum install kernel-devel-$(uname -r) -y
{code}
If you are you are running a PAE or Xen kernel there are separate devel packages for these kernels named kernel-PAE-devel kernel-xen-devel. Some example commands are listed below.
For Xen:
{code}
[root@centos ~]# UNAME=$(awk '{gsub(/xen/,"",$3);print $3}' /proc/version)
[root@centos ~]# yum install kernel-xen-devel-${UNAME} -y
{code}
For PAE:
{code}
[root@centos ~]# UNAME=$(awk '{gsub(/PAE/,"",$3);print $3}' /proc/version)
[root@centos ~]# yum install kernel-PAE-devel-${UNAME} -y
{code}
This is also typically a non issue for Debian and Ubuntu users as the kernel headers are included in the base install.
{kb-related-articles}
It is common place for system administrators to not want to reboot their machine and rightfully so. You might find yourself in a situation where you don’t’ have the latest version of the kernel and {{yum}} isn’t giving you the kernel-devel package that you need to build the {{r1soft hcpdriver}}.
{kb-cause}
The system has an older kernel but you are not ready to upgrade it, but the kernel-devel package for your running kernel is not available in the standard CentOS repository.
{kb-resolution}
You may have a kernel that is no longer in the repository. If this is the case you can find all of the older packages at [http://vault.centos.org|http://vault.centos.org/]. The first step is to ascertain what version of Centos you are running, to do so please see the command below.
{code}
[root@centos~]# cat /etc/redhat-release
CentOS release 5.6 (Final)
{code}
In this example the version is CentOS 5.6. By default your installation should include an entry for the vault repository located at /etc/yum.repos.d/CentOS-Vault.repo
The file for the repository has 4 entries for each of the previous versions one for the base, updates, centosplus, and extras. For the sake of brevity in our example we just include the entries for 5.6 in our example. The goal is to enable each of these so that yum can install the packages you need for your version. To do so we will find the enable line and change the value from 0 to 1.
{code}
enabled=0
{code}
{code}
enabled=1
{code}
To make the changes open up your favorite editor and make the change the enable line for the base, and updates entries in the repository. Once you have completed this it will look like the example below.
{code}
[root@centos~]# nano /etc/yum.repos.d/CentOS-Vault.repo
{code}
{code}
[C5.6-base]
name=CentOS-5.6 - Base
baseurl=http://vault.centos.org/5.6/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
[C5.6-updates]
name=CentOS-5.6 - Updates
baseurl=http://vault.centos.org/5.6/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
{code}
In some cases an entry for your version may not exist in the CentOS-Vault.repo file, however you can edit the file to add the entries you need. The process involves adding new entries in the repo file including your version number from the template below.
{code}
[C(Your Version Number)-base]
name=CentOS-(Your Version Number) - Base
baseurl=http://vault.centos.org/(Your Version Number)/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
[C(Your Version Number-updates]
name=CentOS-(Your Version Number) - Updates
baseurl=http://vault.centos.org/(Your Version Number)/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled=1
{code}
Once you have made the changes to the CentOS-Vault.repo you can try installing your kernel headers with shell expansion.
\\
{code}
[root@centos~]# yum install kernel-devel-$(uname -r) -y
{code}
If you are you are running a PAE or Xen kernel there are separate devel packages for these kernels named kernel-PAE-devel kernel-xen-devel. Some example commands are listed below.
For Xen:
{code}
[root@centos ~]# UNAME=$(awk '{gsub(/xen/,"",$3);print $3}' /proc/version)
[root@centos ~]# yum install kernel-xen-devel-${UNAME} -y
{code}
For PAE:
{code}
[root@centos ~]# UNAME=$(awk '{gsub(/PAE/,"",$3);print $3}' /proc/version)
[root@centos ~]# yum install kernel-PAE-devel-${UNAME} -y
{code}
This is also typically a non issue for Debian and Ubuntu users as the kernel headers are included in the base install.
{kb-related-articles}