Question
An RPM package update may cause issues or be unable to update 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.
To install the versionlock plugin, run the below command for your operating system:
# 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 versionlock RPM 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
# yum install yum-plugin-versionlock
# dnf install python3-dnf-plugin-versionlock
Once the version locking plugin for your operating system is installed, you can lock packages to keep them on the installed version. You can lock the package by running the following command:
Note: You will need to replace "<PACKAGENAME>" with the name of the package you want to version lock.
Once the package is version locked, we would then recommend running the following command. 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 at jobs need to be added again after server reboots.
# echo "yum versionlock delete <PACKAGENAME>" | at now + 30 days
You can view what packages are currently under a version lock with the following command:
# yum versionlock list
For instructions on removing a version lock manually, please see our article on this here:
How to remove version lock packages
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.
Comments
0 comments
Article is closed for comments.