The error “MariaDB cannot be installed”

We will see in this article, that an error occurs in cPanel & WHM when switching from MySQL to MariaDB.

When switching from MySQL to MariaDB in cPanel & WHM, you could get an error message like this:

The preinstall check failed. MariaDB cannot be installed. at /usr/local/cpanel/Cpanel/Yum/Install.pm line 470.

This problem may occur as a result of issues with the yum method. The upgrade process will fail if there are Yum errors in the performance. You can manually search for such errors by using SSH or Terminal to run yum. Running ‘yum update’, for example, can provide more information about what happens with yum.

Based on the error given by yum, the problem should be resolved. A repository or mirror error is a good example.

It is possible that a particular repository is not connecting due to an error like: 

[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

In this scenario, you’ll need to fix the repository’s problem or disable it in order to continue. You may disable it with the following instruction, substituting $repositoryname for the repository’s name:

yum-config-manager --disable $repositoryname

Alternatively, you can adjust “enabled=1” to “enabled=0” in the repository file in the /etc/yum.repos.d directory.

Once the problem with ‘yum’ has been fixed, retry the update in cPanel and WHM.

Hope, this must have helped you in resolving the error issue which occurs while switching from MySQL to MariaDB. For more such information visit our KB section for regular updates. Also don’t forget to check our web hosting plans today.