PHP升级错误(CentOS 6.4上的PHP 5.3.3到PHP 5.4.19)

我正在使用CentOS 6.4并且我遵循this tutorial以便将PHP从v 5.3.3升级到v 5.4.19但是我收到以下错误

Error: PHP54w-common conflicts with PHP-common-5.3.3-23.el6_4.i686

.我该如何解决这个问题?

[my_profile@localhost gplus-quickstart-PHP]$sudo rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm                                                           
[sudo] password for my_profile:                                                    
Retrieving http://mirror.webtatic.com/yum/el6/latest.rpm                        
warning: /var/tmp/rpm-tmp.S0yqSL: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY                                                                          
Preparing...                ########################################### [100%]  
   1:webtatic-release       ########################################### [100%]  
[my_profile@localhost gplus-quickstart-PHP]$sudo yum install PHP54w
Loaded plugins: fastestmirror, refresh-packagekit, security      
Loading mirror speeds from cached hostfile                       
 * base: mirror.netglobalis.net                                  
 * extras: mirror.netglobalis.net                                
 * rpmforge: mirror.nexcess.net                                  
 * updates: mirror.netglobalis.net                               
 * webtatic: us-east.repo.webtatic.com                           
webtatic                                                 | 2.9 kB     00:00     
webtatic/primary_db                                      |  98 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package PHP54w.i386 0:5.4.19-1.w6 will be installed
--> Processing Dependency: PHP54w-common = 5.4.19-1.w6 for package: PHP54w-5.4.19-1.w6.i386
--> Processing Dependency: PHP54w-cli = 5.4.19-1.w6 for package: PHP54w-5.4.19-1.w6.i386
--> Running transaction check
---> Package PHP54w-cli.i386 0:5.4.19-1.w6 will be installed
---> Package PHP54w-common.i386 0:5.4.19-1.w6 will be installed
--> Processing Conflict: PHP54w-common-5.4.19-1.w6.i386 conflicts PHP-common < 5.4.0
--> Finished Dependency Resolution
Error: PHP54w-common conflicts with PHP-common-5.3.3-23.el6_4.i686
 You Could try using --skip-broken to work around the problem
 You Could try running: rpm -Va --nofiles --nodigest
[my_profile@localhost gplus-quickstart-PHP]$^C
[my_profile@localhost gplus-quickstart-PHP]$^C
[my_profile@localhost gplus-quickstart-PHP]$Error: PHP54w-common conflicts with PHP-common-5.3.3-23.el6_4.i686
bash: Error:: command not found
[my_profile@localhost gplus-quickstart-PHP]$

解决方法:

你引用的教程确实建议在一个新系统上使用这个Webtatic repo,你可以避免与已安装的软件包冲突,但建议你可以使用(以root用户或sudo方式)升级当前安装的PHP

yum install yum-plugin-replace
yum replace PHP-common --replace-with=PHP54w-common

然后再次尝试sudo yum install PHP54w.

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...