Cause
When an RPM transaction is incomplete, it can create duplicate database entries, leaving the RPM database in an inconsistent state and causing package update errors.
Symptoms
When running updates, I am seeing duplicate RPM package errors.
CONFIG_TEXT: Error: lvemanager conflicts with lve-wrappers-0.6-11.el7.cloudlinux.x86_64
CONFIG_TEXT: Error: Package: ea-php72-php-calendar-7.2.19-1.1.3.cpanel.x86_64 (EA4)
Requires: ea-php72-php-common(x86-64) = 7.2.19-1.1.3.cpanel
You can confirm this by running the following to show which RPMs are duplicates.
# package-cleanup --dupes
Example output:
# package-cleanup --dupes|grep cpanel
ea-php70-php-litespeed-7.0.30-1.1.6.cpanel.x86_64
ea-php71-pear-1.10.1-12.12.7.cpanel.noarch
ea-php56-php-imap-5.6.36-1.1.6.cpanel.x86_64
ea-php55-php-iconv-5.5.38-37.37.5.cpanel.x86_64
ea-php55-php-fpm-5.5.38-37.37.5.cpanel.x86_64
ea-php55-php-devel-5.5.38-37.37.5.cpanel.x86_64
ea-apache24-tools-2.4.33-5.5.1.cpanel.x86_64
ea-php55-php-imap-5.5.38-37.37.5.cpanel.x86_64
Procedure
Instead of using the cleandupes flag, you can use the command below to remove each duplicate RPM from the RPM database and reinstall the package to ensure it is fully installed.
- Access your cPanel & WHM server as the
rootuser. - Navigate to Home / Server Configuration / Terminal
- Run the command:
# package-cleanup --dupes | tail -n +3 | sort --version-sort | awk 'NR % 2 {print "rpm -e --justdb --nodeps " $1 } !(NR % 2) {match($0, "-[0-9]");print "yum -y reinstall " substr($0,0,RSTART-1)}' | sh
Comments
0 comments
Article is closed for comments.