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

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

我正在使用 CentOS 6.4 并且我正在关注本教程为了将 PHP 从 v 5.3.3 升级到 v 5.4.19,但出现以下错误:

错误:php54w-common 与 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]$

答案1

您引用的教程确实建议在新系统上使用此 Webtatic 存储库,这样您可以避免与已安装的软件包发生冲突,但建议您可以使用(作为 root 或使用 sudo)升级当前安装的 php:

yum install yum-plugin-replace
yum replace php-common --replace-with=php54w-common

然后再试sudo yum install php54w一次。

答案2

顺便说一句,您可能应该与要求您更新到带外软件包的供应商联系,以确认哪些功能绝对需要对 PHP 进行此发行版更改。

通常,修复和(少数)功能会向后移植到已建立的、经过认证的发行版本。一些供应商错误地认为“5.4 比 5.3 更好,所以它一定更好、更闪亮”,而这种想法往往是非常冒险的。当你用自动的、琐碎的更新换掉精心维护的版本时,这些更新是由十几名专门专家组成的团队针对操作系统进行测试的,其中一个由“某个人”滚动一次,然后放到文件服务器上以供使用。为了测试他,你在停机时间、错误、安全错误(这些问题永远不会在该版本中得到修复)和不一致方面付出的代价比本周的版本要多一些。

当心。最近询问我们的供应商时,我们发现他们甚至不知道这个存储库和 EPEL 之间的区别——我保证这是两个截然不同的东西。

相关内容