Error in installing MySQL devel for CentOS MySQL

Question

Execute Yum install MySQL devel to install the development environment. An error occurs

[root@VM-0-17-centos software]# yum install mysql-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * centos-sclo-rh: mirrors.163.com
 * centos-sclo-sclo: mirrors.163.com
Resolving Dependencies
--> Running transaction check
---> Package mariadb-devel.i686 1:5.5.68-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-32) = 1:5.5.68-1.el7 for package: 1:mariadb-devel-5.5.68-1.el7.i686
--> Processing Dependency: libmysqlclient.so.18 for package: 1:mariadb-devel-5.5.68-1.el7.i686
---> Package mariadb-devel.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.68-1.el7 for package: 1:mariadb-devel-5.5.68-1.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.i686 1:5.5.68-1.el7 will be installed
---> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be installed
Removing mariadb-libs.i686 1:5.5.68-1.el7 - u due to obsoletes from installed mysql-community-libs-5.7.34-1.el7.x86_64
Removing mariadb-libs.x86_64 1:5.5.68-1.el7 - u due to obsoletes from installed mysql-community-libs-5.7.34-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.i686 1:5.5.68-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-32) = 1:5.5.68-1.el7 for package: 1:mariadb-devel-5.5.68-1.el7.i686
--> Processing Dependency: libmysqlclient.so.18 for package: 1:mariadb-devel-5.5.68-1.el7.i686
---> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.68-1.el7 for package: 1:mariadb-devel-5.5.68-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: 1:mariadb-devel-5.5.68-1.el7.i686 (os)
           Requires: libmysqlclient.so.18
Error: Package: 1:mariadb-devel-5.5.68-1.el7.x86_64 (os)
           Requires: mariadb-libs(x86-64) = 1:5.5.68-1.el7
Error: Package: 1:mariadb-devel-5.5.68-1.el7.i686 (os)
           Requires: mariadb-libs(x86-32) = 1:5.5.68-1.el7
 You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
rdma-core-devel-51mlnx1-1.51066.x86_64 has missing requires of ibacm(x86-64) = ('0', '51mlnx1', '1.51066')

reason

Because there is no MySQL source, you will be prompted to install mariadb-devel-5.5.50-1.el7 when installing MySQL devel_ 2.x86_ 64, and the system does not have mysql_ config

Solution

wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm
rpm -ivh mysql57-community-release-el7-10.noarch.rpm
ls /etc/yum.repos.d/

The installation source appears

[root@VM-0-17-centos software]# ls /etc/yum.repos.d/
CentOS-Base.repo  CentOS-Epel.repo  CentOS-SCLo-scl.repo  CentOS-SCLo-scl-rh.repo  mysql-community.repo  mysql-community-source.repo

Continue to complete the installation

yum install mysql-devel

Read More: