在 centos 6 上安装 php-mysql

在 centos 6 上安装 php-mysql

我已经在运行 Centos 6 的计算机上安装了 MariaDB 作为数据库和 Nginx。当我想安装 php-mysql 驱动程序时,出现了这个问题:

# yum 安装 php-mysql

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.gtcomm.net
 * epel: fedora-epel.mirror.iweb.com
 * extras: mirror.agmn.ca
 * updates: centos.mirror.gtcomm.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-pdo(x86-64) for package: php-mysql-5.3.3-27.el6_5.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql-5.3.3-27.el6_5.x86_64
Package mysql-libs is obsoleted by MariaDB-shared, but obsoleting package does not provide for requirements
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql-5.3.3-27.el6_5.x86_64
Package mysql-libs is obsoleted by MariaDB-shared, but obsoleting package does not provide for requirements
--> Running transaction check
---> Package php-mysql.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql-5.3.3-27.el6_5.x86_64
Package mysql-libs is obsoleted by MariaDB-shared, but obsoleting package does not provide for requirements
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql-5.3.3-27.el6_5.x86_64
Package mysql-libs is obsoleted by MariaDB-shared, but obsoleting package does not provide for requirements
---> Package php-pdo.x86_64 0:5.3.3-27.el6_5 will be installed
--> Finished Dependency Resolution
Error: Package: php-mysql-5.3.3-27.el6_5.x86_64 (updates)
           Requires: libmysqlclient.so.16(libmysqlclient_16)(64bit)
           Available: mysql-libs-5.1.71-1.el6.x86_64 (base)
               libmysqlclient.so.16(libmysqlclient_16)(64bit)
           Available: mysql-libs-5.1.73-3.el6_5.x86_64 (updates)
               libmysqlclient.so.16(libmysqlclient_16)(64bit)
Error: Package: php-mysql-5.3.3-27.el6_5.x86_64 (updates)
           Requires: libmysqlclient.so.16()(64bit)
           Available: mysql-libs-5.1.71-1.el6.x86_64 (base)
               libmysqlclient.so.16()(64bit)
           Available: mysql-libs-5.1.73-3.el6_5.x86_64 (updates)
               libmysqlclient.so.16()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我也尝试过--skip-brokenrpm -Va --nofiles --nodigest但结果却不是这样

答案1

您似乎已从项目提供的软件包安装了 MariaDB。首先需要从 MariaDB 安装等效的 MariaDB-compat RPM,然后才能安装这些软件包。此软件包与需要 CentOS 附带的旧版 MySQL 的发行版软件包兼容。

相关内容