从php53u到php54的优雅升级

前端之家收集整理的这篇文章主要介绍了从php53u到php54的优雅升级前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我们使用iuscommunity repo运行CentOS 6节点,并希望将先前安装的PHP53u升级PHP54.

然而,这引入了PHP53u和amp;之间的依赖冲突. PHP54.有没有人有这个问题的想法?

--> Running transaction check
---> Package PHP54-fpm.i686 0:5.4.5-1.ius.el6 will be installed
--> Processing Dependency: PHP-common = 5.4.5-1.ius.el6 for package: PHP54-fpm-5.4.5-1.ius.el6.i686
---> Package PHP54-gd.i686 0:5.4.5-1.ius.el6 will be installed
---> Package PHP54-mbstring.i686 0:5.4.5-1.ius.el6 will be installed
---> Package PHP54-pecl-apc.i686 0:3.1.11-2.ius.el6 will be installed
--> Processing Dependency: PHP54 >= 5.3.5-1 for package: PHP54-pecl-apc-3.1.11-2.ius.el6.i686
--> Running transaction check
---> Package PHP54.i686 0:5.4.5-1.ius.el6 will be installed
--> Processing Dependency: PHP54-cli = 5.4.5-1.ius.el6 for package: PHP54-5.4.5-1.ius.el6.i686
---> Package PHP54-common.i686 0:5.4.5-1.ius.el6 will be installed
--> Running transaction check
---> Package PHP54-cli.i686 0:5.4.5-1.ius.el6 will be installed
--> Processing Conflict: PHP54-5.4.5-1.ius.el6.i686 conflicts PHP53u
--> Processing Conflict: PHP54-5.4.5-1.ius.el6.i686 conflicts PHP < 5.4
--> Finished Dependency Resolution
Error: PHP54 conflicts with PHP53u
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
你试过删除PHP53u吗?一个简单的:
yum remove PHP53u

其次是:

yum install PHP54

应该为你做的伎俩.如果没有,那么你可以尝试使用’rpm’工具删除PHP53u包,保持依赖完整,但首先检查安装的包列表,以便稍后可以从新的PHP54存储库重新安装它们:

rpm -qa | grep ^PHP53u.* > /root/PHP-packages.log

保留所生成列表的副本.在我的一台服务器上,此列表如下所示:

$rpm -qa | grep ^PHP54*
PHP54-common-5.4.4-1.ius.el6.x86_64
PHP54-pdo-5.4.4-1.ius.el6.x86_64
PHP54-MysqL-5.4.4-1.ius.el6.x86_64
PHP54-fpm-5.4.4-1.ius.el6.x86_64
PHP54-gd-5.4.4-1.ius.el6.x86_64
PHP54-cli-5.4.4-1.ius.el6.x86_64
PHP54-5.4.4-1.ius.el6.x86_64
PHP54-mbstring-5.4.4-1.ius.el6.x86_64

然后,我可以删除这些,而不删除依赖项,如下所示:

for p in $( cat /root/PHP-packages.log ); do rpm -e --nodeps $p; done

(注意我在这里使用’PHP54′,你需要使用’PHP53u’).

一旦你完成了这个,只需通过yum安装PHP54软件包:

yum install PHP54

或者你可以自动重新安装所有东西:

yum install $( cat /root/PHP-packages.log | sed 's/PHP53u/PHP54/g' )

完成.

这是整个事情的一个班轮:

rpm -qa | grep ^PHP53u.* > /root/PHP-packages.log; for p in $( cat /root/PHP-packages.log ); do rpm -e --nodeps $p; done; yum install $( cat /root/PHP-packages.log | sed 's/PHP53u/PHP54' ) -y

我希望这有帮助 :-)

原文链接:https://www.f2er.com/php/139285.html

猜你在找的PHP相关文章