Question
An RPM package update may cause issues or fail due to conflicts, and an RPM version lock may be needed. How do you version-lock an RPM package?
Answer
You need to install the versionlock DNF or Yum plugin to manage version locks.
Please note that cPanel, LLC only supports the cPanel-provided software and does not provide general system administration services. Any issues related to system RPMs not provided by cPanel would be best addressed by an obtained qualified server/systems administrator.
-
Install the package
# yum install yum-versionlock
Note: CentOS 7 went End of Life on June 30th 2024. If you run into an issue installing yum-versionlock due to the repository being archived, you can install the
versionlockRPM from the CentOS vault.# yum install https://vault.centos.org/7.9.2009/os/x86_64/Packages/yum-plugin-versionlock-1.1.31-54.el7_8.noarch.rpm
-
Lock the package
Note: You will need to replace "<PACKAGENAME>" with the name of the package you want to version lock.
# yum versionlock add <PACKAGENAME>
-
List the locks to verify that the lock was added.
# yum versionlock list
-
Optional, delete the lock automatically after 30 days.
Note: This will set the package to automatically unlock after 30 days. This will allow time for an update to be released and for the package to be unlocked, enabling updates to be applied. The
atjobs need to be added again after the server reboots.# echo "yum versionlock delete <PACKAGENAME>" | at now + 30 days
-
Install the package
With YUM:
# yum install yum-plugin-versionlock
With DNF:
# dnf install python3-dnf-plugin-versionlock
-
Lock the package
Note: You will need to replace "<PACKAGENAME>" with the name of the package you want to version lock.
With YUM:
# yum versionlock add <PACKAGENAME>
With DNF:
# dnf versionlock add <PACKAGENAME>
-
List the locks to verify that the lock was added.
With YUM:
# yum versionlock list
With DNF:
# dnf versionlock list
-
Optional, delete the lock automatically after 30 days.
Note: This will set the package to automatically unlock after 30 days. This will allow time for an update to be released and for the package to be unlocked, enabling updates to be applied. The
atjobs need to be added again after the server reboots.With YUM:
# echo "yum versionlock delete <PACKAGENAME>" | at now + 30 days
With DNF:
# echo "dnf versionlock delete <PACKAGENAME>" | at now + 30 days
Comments
0 comments
Article is closed for comments.