我正在运行RHEL 7并按顺序安装以下内容:

  • 我在SO Removing MariaDB上使用此问题中的步骤删除了安装附带的mariadb

  • 我使用mysql.com的bundle安装了mysql社区

  • 我使用yum install php安装了php

现在我正在尝试使用yum install php-mysql安装php-mysql,但显示以下错误: Error: Package: php-mysql-5.4.16-42.el7.x86_64 (Server) Requires: libmysqlclient.so.18()(64bit)

解决依赖关系

--> Running transaction check
---> Package php-mysql.x86_64 0:5.4.16-42.el7 will be installed
--> Processing Dependency: php-pdo(x86-64) = 5.4.16-42.el7 for package: php-mysql-5.4.16-42.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-42.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-42.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be installed
---> Package php-pdo.x86_64 0:5.4.16-42.el7 will be installed
Removing mariadb-libs.x86_64 1:5.5.56-2.el7 - u due to obsoletes from installed MySQL-shared-compat-5.6.40-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be installed
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-42.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-42.el7.x86_64
--> Finished Dependency Resolution
Error: Package: php-mysql-5.4.16-42.el7.x86_64 (Server)
           Requires: libmysqlclient.so.18()(64bit)
Error: Package: php-mysql-5.4.16-42.el7.x86_64 (Server)
           Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

当我尝试安装libmysqlclient.so.18时:

Resolving Dependencies
--> Running transaction check
---> Package mariadb-libs.i686 1:5.5.56-2.el7 will be installed
Removing mariadb-libs.i686 1:5.5.56-2.el7 - u due to obsoletes from installed MySQL-shared-compat-5.6.40-1.el7.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.i686 1:5.5.56-2.el7 will be installed
--> Finished Dependency Resolution

我尝试重新安装php并从mariadb中删除eveything但没有任何变化 . 我感谢任何帮助 .