Symptoms
When trying to update/upgrade cPanel, an error similar to the following is presented:
[2020-06-03 06:29:43 -0500] ***** FATAL: Test install failed: error: Failed dependencies:
[2020-06-03 06:29:43 -0500] dovecot = 2.3.8-2.cp1186 is needed by (installed) dovecot-xaps-2.3.8-2.cp1186.x86_64
[2020-06-03 06:29:43 -0500] The Administrator will be notified to review this output when this script completes
[2020-06-03 06:29:43 -0500] ***** FATAL: Error testing if the RPMs will install: Test install failed: error: Failed dependencies:
[2020-06-03 06:29:43 -0500] dovecot = 2.3.8-2.cp1186 is needed by (installed) dovecot-xaps-2.3.8-2.cp1186.x86_64
[2020-06-03 06:29:43 -0500] see https://go.cpanel.net/rpmcheckfailed for more information
[2020-06-03 06:29:43 -0500] The Administrator will be notified to review this output when this script completes
[2020-06-03 06:29:43 -0500] Removing staged files and directories for binaries/linux-c7-x86_64, cpanel
Description
The cPanel upgrade/update process requires several dependencies to be fulfilled before continuing, in particular cPanel related packages.
The error showed above, which can vary in the packages name the core issue remains the same as there would be some RPM package missing:
FATAL: Error testing if the RPMs will install: Test install failed: error: Failed dependencies:
It is essential to note this article will help fix issues with cPanel provided RPMs, not the operating system or 3rd party provided packages.
Workaround
Run the cPanel script "/scripts/check_cpanel_rpms--fix," which if having missing cPanel dependencies will show the following:
/scripts/check_cpanel_rpms --fix
[2020-06-03 08:29:11 -0500]
[2020-06-03 08:29:11 -0500] Problems were detected with cPanel-provided files which are RPM controlled.
[2020-06-03 08:29:11 -0500] If you did not make these changes intentionally, you can correct them by running:
[2020-06-03 08:29:11 -0500]
[2020-06-03 08:29:11 -0500] > /usr/local/cpanel/scripts/check_cpanel_rpms --fix
[2020-06-03 08:29:11 -0500] The following RPMs are missing from your system:
[2020-06-03 08:29:11 -0500] cpanel-git-2.25.1-2.cp1188
[2020-06-03 08:29:11 -0500] cpanel-git-templates-2.25.1-2.cp1188
[2020-06-03 08:29:11 -0500] cpanel-mailman-2.1.33-1.cp1186
[2020-06-03 08:29:11 -0500] cpanel-mariadb-connector-3.1.8-1.cp1186
[2020-06-03 08:29:11 -0500] cpanel-sqlite-3.31.1-1.cp1186
[2020-06-03 08:29:11 -0500] cpanel-unbound-1.9.4-3.cp1186
[2020-06-03 08:29:11 -0500] cpanel-wrap-86.0-4.cp1186
[2020-06-03 08:29:11 -0500] dovecot-2.3.10.1-1.cp1186
[2020-06-03 08:29:11 -0500] exim-4.93-5.cp1186
The above list of packages will vary depending on the missing RPM. The above is just an excellent example of the working script.
For detail information and other options, this command provides, please visit https://docs.cpanel.net/knowledge-base/rpm-versions/the-check_cpanel_rpms-script/