2012-05-25 63 views
2

我安裝了php 5.3和mysql server 5.5。我需要安裝php-mysql,但遇到以下衝突。我該如何解決這個問題?php-mysql版本與Mysql服務器衝突

 
yum install php-mysql 
Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
* base: mirrors.versaweb.com 
* elrepo: elrepo.org 
* extras: yum.phx.singlehop.com 
* updates: yum.phx.singlehop.com 
Setting up Install Process 
Resolving Dependencies 
--> Running transaction check 
---> Package php-mysql.x86_64 0:5.3.3-3.el6_2.8 will be installed 
--> Processing Dependency: php-common = 5.3.3-3.el6_2.8 for package: php-mysql-5.3.3-3.el6_2.8.x86_64 
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql-5.3.3-3.el6_2.8.x86_64 
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql-5.3.3-3.el6_2.8.x86_64 
--> Running transaction check 
---> Package mysql-libs.x86_64 0:5.1.61-1.el6_2.1 will be installed 
---> Package php-common.x86_64 0:5.3.3-3.el6_2.5 will be updated 
--> Processing Dependency: php-common = 5.3.3-3.el6_2.5 for package: php-5.3.3-3.el6_2.5.x86_64 
--> Processing Dependency: php-common = 5.3.3-3.el6_2.5 for package: php-cli-5.3.3-3.el6_2.5.x86_64 
--> Processing Dependency: php-common = 5.3.3-3.el6_2.5 for package: php-pdo-5.3.3-3.el6_2.5.x86_64 
---> Package php-common.x86_64 0:5.3.3-3.el6_2.8 will be an update 
--> Running transaction check 
---> Package php.x86_64 0:5.3.3-3.el6_2.5 will be updated 
---> Package php.x86_64 0:5.3.3-3.el6_2.8 will be an update 
---> Package php-cli.x86_64 0:5.3.3-3.el6_2.5 will be updated 
---> Package php-cli.x86_64 0:5.3.3-3.el6_2.8 will be an update 
---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.5 will be updated 
---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.8 will be an update 
--> Finished Dependency Resolution 

Dependencies Resolved 

=============================================================================================================================================================================================== 
Package          Arch          Version            Repository         Size 
=============================================================================================================================================================================================== 
Installing: 
php-mysql          x86_64         5.3.3-3.el6_2.8          updates          79 k 
Installing for dependencies: 
mysql-libs         x86_64         5.1.61-1.el6_2.1          updates         1.2 M 
Updating for dependencies: 
php           x86_64         5.3.3-3.el6_2.8          updates         1.1 M 
php-cli          x86_64         5.3.3-3.el6_2.8          updates         2.2 M 
php-common         x86_64         5.3.3-3.el6_2.8          updates         522 k 
php-pdo          x86_64         5.3.3-3.el6_2.8          updates          73 k 

Transaction Summary 
=============================================================================================================================================================================================== 
Install  2 Package(s) 
Upgrade  4 Package(s) 

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


Transaction Check Error: 
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.61-1.el6_2.1.x86_64 conflicts with file from package MySQL-server-5.5.20-1.linux2.6.x86_64 
    file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.61-1.el6_2.1.x86_64 conflicts with file from package MySQL-server-5.5.20-1.linux2.6.x86_64 
+0

您已經安裝了MySQL在終端使用這四個命令解決了嗎? – Filype

+0

@Filype:是的,我不能重新安裝MySQL – user121196

回答

4

我建議從http://dev.mysql.com/下載shared-compat包,並與替換默認mysql-libsshared-compat提供所有版本的MySQL客戶端庫,它應該滿足未來任何軟件升級或安裝。例如使用一個叫做MySQL-shared-compat-5.5.24-1.el6.x86_64.rpm

要安裝的軟件包,刪除現有mysql-libs包而忽略任何依賴與rpm -e --nodeps mysql-libs並立即與rpm -ihv MySQL-shared-compat-5.5.24-1.el6.x86_64.rpm安裝新的軟件包。

如果服務器正在處理任何生產流量,您當然應該安排一個維護窗口,因爲在安裝新庫之前刪除庫可能會導致錯誤。

稍後,您還應該考慮將服務器和客戶端軟件包替換爲官方軟件包,以免從不同供應商構建。

0

我有類似的問題。升級到PHP 5.4應該可以工作

0

我不得不重新安裝php,使用mysql和mysql啓動pdo,這種方式總是比較簡單。

2

我有類似的問題一樣,

Error: mysql conflicts with MySQL-server 
Error: mysql-server conflicts with MySQL-server 

它是由

yum remove MySQL-devel* -y 
yum remove MySQL-devel-community* -y 
yum remove MySQL-client* -y 
yum remove MySQL-server* -y