1

I have a server running CentOS 7.3.1611, kernel 3.10.0-514. Now when installing kernel-devel, the version in repo is 3.10.0-1160 which differ from kernel version. I know that I can get exact kernel-devel rpm, but the dependency is too complicated.

I would like to ask is there any feasible way to install specific kernel-devel version along with all the dependencies? (I do not want to upgrade current kernel).

1
  • What dependencies are you talking about? kernel-devel doesn't have any dependencies that could remotely cause any issues, it's only dependencies are /bin/sh, /usr/bin/find and perl.
    – TooTea
    Commented Nov 19, 2020 at 8:49

2 Answers 2

2

All the packages that were ever released by CentOS can be found in an archive on vault.centos.org. You can just point yum to the package(s) you want. For example:

yum install https://vault.centos.org/7.3.1611/updates/x86_64/Packages/kernel-devel-3.10.0-514.26.2.el7.x86_64.rpm

If you need yum to automatically pull in archived dependencies of some package, you can just enable the Vault repo for that particular transaction:

yum --enablerepo='C7.3.1611-updates' install kernel-devel-3.10.0-514.26.2

You can find the names of all vault repositories in /etc/yum.repos.d/CentOS-Vault.repo.

2
  • Thank you, I did not know that vault repo. I am able to install the exact version of kernel-headers and kernel-devel using above.
    – Hiep Ho
    Commented Nov 20, 2020 at 9:05
  • Note that you don't have to have any exact version of kernel-headers. That's a package just like any other, so you can't install multiple versions side-by-side. You will always have just one (most recent) kernel-headers, no matter how many kernel versions you have installed or which version you are currently running. The headers are always backward compatible.
    – TooTea
    Commented Nov 20, 2020 at 9:44
1

If you have the kernel-devel RPM you want, you should be able to install it using yum - for example:

# yum install kernel-devel-3.10.0-514.el7.x86_64.rpm

yum will resolve the dependencies for you (assuming it is possible to do so from the repos that are configured on your system), and will install them along with the RPM.

1
  • Thank you, I did not know that yum can also resolve dependencies from a rpm package :).
    – Hiep Ho
    Commented Nov 20, 2020 at 9:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .