闲来无事,想弄个PHP网站玩玩,于是开始了折腾,路线LAMP,但是在安装php-mysql扩展的时候,出现了问题。。
问题
因为安装LAMP,需要php-mysql扩展,机子是centOS6.5,于是首先查看软件库中有没有扩展:yum search php-mysql
既然有那就开始安装扩展吧:yum install php-mysql.x86_64
dang,出现了如下错误
Transaction Check Error: file /usr/share/mysql/charsets/Index.xml
from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file
from package mysql-community-common-5.7.21-1.el6.x86_64
…………………………………………
……………………………………….. file
/usr/share/mysql/ukrainian/errmsg.sys from install of
mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package
mysql-community-common-5.7.21-1.el6.x86_64 file /etc/my.cnf from
install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from
package mysql-community-server-5.7.21-1.el6.x86_64Error Summary
仔细分析,原来是之前安装过MySQL5.7,现在安装的MySQL-libs是5.1版本,所以兼容出现了问题
解决
感谢热心网友,发现可以使用MySQL-shared-compat来解决这个兼容性问题
首先访问 http://rpm.pbone.net/index.php3?stat=3&search=MySQL-shared-compat&srodzaj=3&dist%5B%5D=52
点击图中箭头处
接下来,你就可以正常的安装yum install php-mysql 了,因为已经解决了兼容性的问题了。