Install a specific package version in CentOS
Solution 1
Another thing you can do which can be a bit more work than previous answer but works as well is to download the package manually and then run
# yum localinstall /path/package.rpm
That should try to install the specific package you downloaded.
Solution 2
I believe the following will do what you want, as by default yum won't let you install a release BELOW what's available:
yum install yum-versionlock
and then:
yum --allow-downgrade install bind-libs-9.8.2-0.17.rc1.el6_4.5.x86_64
and to maintain this version in the case of future package updates to your system:
yum versionlock bind-libs
Related videos on Youtube
![Nathan McCoy](https://i.stack.imgur.com/maqOy.png?s=256&g=1)
Nathan McCoy
Tinkerer, Semantic Ambiguator and Retro-Tech enthusiast.
Updated on September 18, 2022Comments
-
Nathan McCoy almost 2 years
I have two web servers, a production web server and a backup web server.
After running a
rpm -qa
on the two servers, I noticed some package discrepancies.It seems like, someone ran a
yum update
at some point in the past on the production server, but did not run it on the backup web server.I would like to install a few very specific packages on the backup web server.
for example :
yum install bind-libs-9.8.2-0.17.rc1.el6_4.5.x86_64
If I run
yum install bind-libs-9.8.2-0.17.rc1.el6_4.5.x86_64
it seems to try and find the newest package that matches, and not the specific package I would like.... ---> Package bind-utils.x86_64 32:9.8.2-0.17.rc1.el6_4.4 will be updated ---> Package bind-utils.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be an update ... ====================================================================================== Package Arch Version Repository Size ====================================================================================== Updating for dependencies: bind-libs x86_64 32:9.8.2-0.17.rc1.el6_4.6 updates 878 k ...
Is there a way to install only the package I would like and nothing newer?
-
Ruairí N. over 10 yearsYou're welcome. Do let us know how it goes.
-
Ruairí N. over 10 yearsrpmfind.net is a useful resource for finding RPMs of various versions from various distributions.
-
Tomas over 10 yearsTrue. I like to go straight to the distro though but yes, that site is really useful as well :)
-
Nathan McCoy over 10 yearsI picked your answer because of your help with the mirror and the details about yum. I just appended .rpm to my corresponding packages and downloaded them all with wget (quick bash script). thanks!