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

**URL:** <https://www.isharkfly.com/t/php-php-mysql-percona-conflict/3359>\
**Category:** PHP\
**Created:** [August 14, 2012, 9:02pm UTC](https://www.isharkfly.com/t/php-php-mysql-percona-conflict/3359 "2012-08-14T21:02:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [August 14, 2012, 9:02pm UTC](https://www.isharkfly.com/t/php-php-mysql-percona-conflict/3359/1 "2012-08-14T21:02:48Z")

</div>

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

- base: [mirror.7x24web.net](http://mirror.7x24web.net)
- extras: [mirror.7x24web.net](http://mirror.7x24web.net)
- updates: [mirror.7x24web.net](http://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

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

最好的解决办法是：

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

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

- base: [mirror.7x24web.net](http://mirror.7x24web.net)
- extras: [mirror.7x24web.net](http://mirror.7x24web.net)
- updates: [mirror.7x24web.net](http://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!  
[root@verani-qadb bin]#  
[/code]等这安装完成后，再安装 php-mysql 就可以了。

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

- base: [mirror.7x24web.net](http://mirror.7x24web.net)
- extras: [mirror.7x24web.net](http://mirror.7x24web.net)
- updates: [mirror.7x24web.net](http://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  
 → Finished Dependency Resolution

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]这样就可以解决安装冲突的问题了。
