Php 安装组件出现 php-mysql Percona conflict 冲突错误

安装日志如下:[code][[email protected] bin]# yum install php-mysql
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile

  • base: mirror.7x24web.net
  • extras: mirror.7x24web.net
  • updates: mirror.7x24web.net
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package php-mysql.x86_64 0:5.3.3-14.el6_3 will be installed
    –> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql-5.3.3-14.el6_3.x86_64
    –> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql-5.3.3-14.el6_3.x86_64
    –> Running transaction check
    —> Package Percona-Server-shared-51.x86_64 0:5.1.63-rel13.4.443.rhel6 will be installed
    –> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
Package Arch Version Repository Size

Installing:
php-mysql x86_64 5.3.3-14.el6_3 updates 79 k
Installing for dependencies:
Percona-Server-shared-51 x86_64 5.1.63-rel13.4.443.rhel6 percona 2.8 M

Transaction Summary

Install 2 Package(s)

Total size: 2.9 M
Installed size: 8.3 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test

Transaction Check Error:
file /usr/lib64/libmysqlclient.so from install of Percona-Server-shared-51-5.1.63-rel13.4.443.rhel6.x86_64 conflicts with file from package Percona-Server-shared-55-5.5.25a-rel27.1.277.rhel6.x86_64
file /usr/lib64/libmysqlclient_r.so from install of Percona-Server-shared-51-5.1.63-rel13.4.443.rhel6.x86_64 conflicts with file from package Percona-Server-shared-55-5.5.25a-rel27.1.277.rhel6.x86_64

Error Summary

[[email protected] bin]# [/code]在最后显示了 Percona-Server-shared 与需要安装的 php-mysql 冲突了。

最好的解决办法是:

先安装 Percona-Server-shared-compat 组件。

命令如下:yum install Percona-Server-shared-compat服务器安装日志如下:[code][[email protected]qadb bin]# yum install Percona-Server-shared-compat
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile

  • base: mirror.7x24web.net
  • extras: mirror.7x24web.net
  • updates: mirror.7x24web.net
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package Percona-Server-shared-compat.x86_64 0:5.5.25a-rel27.1.277.rhel6 will be installed
    –> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository
Size

Installing:
Percona-Server-shared-compat x86_64 5.5.25a-rel27.1.277.rhel6 percona 3.8 M

Transaction Summary

Install 1 Package(s)

Total download size: 3.8 M
Installed size: 11 M
Is this ok [y/N]: y
Downloading Packages:
Percona-Server-shared-compat-5.5.25a-rel27.1.277.rhel6.x | 3.8 MB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : Percona-Server-shared-compat-5.5.25a-rel27.1.277.rhel6.x86 1/1
Verifying : Percona-Server-shared-compat-5.5.25a-rel27.1.277.rhel6.x86 1/1

Installed:
Percona-Server-shared-compat.x86_64 0:5.5.25a-rel27.1.277.rhel6

Complete!
[[email protected] bin]#
[/code]等这安装完成后,再安装 php-mysql 就可以了。

服务器安装输出日志如下:[code][[email protected] bin]# yum install php-mysql
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile

Dependencies Resolved

================================================================================
Package Arch Version Repository Size

Installing:
php-mysql x86_64 5.3.3-14.el6_3 updates 79 k

Transaction Summary

Install 1 Package(s)

Total size: 79 k
Installed size: 215 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-mysql-5.3.3-14.el6_3.x86_64 1/1
Verifying : php-mysql-5.3.3-14.el6_3.x86_64 1/1

Installed:
[/code]这样就可以解决安装冲突的问题了。