機子是centOS6.5,因而首先查看軟件庫中有沒有擴展:yum search php-mysqlphp
既然有那就開始安裝擴展吧:yum install php-mysql
dang,出現了以下錯誤mysql
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.24-1.el6.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/cp1256.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/cp1257.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/cp850.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/cp852.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/cp866.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/dec8.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/geostd8.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/greek.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/hebrew.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/hp8.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/keybcs2.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/koi8r.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/koi8u.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/latin1.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/latin2.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/latin5.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/latin7.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/macce.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/macroman.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/charsets/swe7.xml from install of mysql-libs-5.1.73-8.el6_8.x86_64 conflicts with file from package mysql-community-common-5.7.24-1.el6.x86_64
file /usr/share/mysql/czech/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.24-1.el6.x86_64
file /usr/share/mysql/danish/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.24-1.el6.x86_64
file /usr/share/mysql/dutch/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.24-1.el6.x86_64
file /usr/share/mysql/english/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.24-1.el6.x86_64
file /usr/share/mysql/estonian/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.24-1.el6.x86_64
file /usr/share/mysql/french/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.24-1.el6.x86_64sql
仔細分析,原來是以前安裝過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 post
點擊圖中箭頭處 .net
解決
感謝熱心網友,發現能夠使用MySQL-shared-compat來解決這個兼容性問題
首先訪問 http://rpm.pbone.net/index.php3?stat=3&search=MySQL-shared-compat&srodzaj=3&dist%5B%5D=52 3d
點擊圖中箭頭處 xml
而後想辦法拿到下圖中的連接blog
下載,ci
而後安裝it
接下來,你就能夠正常的安裝yum install php-mysql 了,由於已經解決了兼容性的問題了。