When updating from MySQL to MariaDB within cPanel & WHM, you may find an error output such as the following:
The preinstall check failed. MariaDB cannot be installed. at /usr/local/cpanel/Cpanel/Yum/Install.pm line 470.
This issue can occur due to problems during the yum process. Yum errors in the output can cause the upgrade process to fail. You can check for such errors by running yum manually using SSH or Terminal. For example, running 'yum update' may provide more output regarding what occurs with yum.
The issue should be addressed based on the error provided by yum. A typical example is a repository or mirror error.
A specific repository may be failing to connect with an error such as:
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
In this specific case, you would need to resolve the issue with the repository or disable it to proceed. You can disable it with this command, replacing $repositoryname with the name of the repository:
yum-config-manager --disable $repositoryname
Alternatively, you can edit the repository file in the /etc/yum.repos.d directory to change "enabled=1" to "enabled=0".
Re-attempt the upgrade within cPanel & WHM once the issue with 'yum' has been resolved.