You are getting this output;
The installation process found evidence that MySQL or MariaDB was installed on this server. You must install cPanel & WHM on a clean server.
You delete mysql or mariadb from your server. You issuing the following command:
yum -y remove mysql
yum -y remove mariadb
And clean your server. Try to reinstall cPanel/WHM.
Peace out !