您好,欢迎访问一九零五行业门户网

如何解决php5.4 系统升级出错问题

php5.4系统升级出错的解决办法:1、安装libmcrypt,libmcrypt-devel;2、升级epel源;3、重新升级即可。
本文操作环境:centos7.3系统、php5.4版、dell g3电脑。
如何解决php5.4 系统升级出错问题?
centos7 php5.4 升级 php5.6 缺少libmcrypt问题解决办法
系统为centos7.3,安装php后,版本为5.4,当进行升级5.6时发生错误:报错缺少libmcrypt.so.4()(64bit)库
需要安装libmcrypt,libmcrypt-devel:
yum install libmcrypt libmcrypt-devel
直接输入以上指令,出错!问题为epel源未更新到最新版本。
需要升级epel源:
命令:yum -y install epel-release
yum -y install epel-releaseloaded plugins: fastestmirror, langpacksloading mirror speeds from cached hostfile * base: 100.125.0.40 * extras: 100.125.0.40 * updates: 100.125.0.40 * webtatic: us-east.repo.webtatic.comresolving dependencies--> running transaction check---> package epel-release.noarch 0:7-9 will be updated---> package epel-release.noarch 0:7-11 will be an update--> finished dependency resolutiondependencies resolved======================================================================================================== package arch version repository size========================================================================================================updating: epel-release noarch 7-11 extras 15 ktransaction summary========================================================================================================upgrade 1 packagetotal download size: 15 kdownloading packages:delta rpms disabled because /usr/bin/applydeltarpm not installed.epel-release-7-11.noarch.rpm | 15 kb 00:00:00running transaction checkrunning transaction testtransaction test succeededrunning transaction updating : epel-release-7-11.noarch 1/2 cleanup : epel-release-7-9.noarch 2/2 verifying : epel-release-7-11.noarch 1/2 verifying : epel-release-7-9.noarch 2/2updated: epel-release.noarch 0:7-11complete!
从7-9 升级至7-11
epel最新是7-12,因此再输入一次上面的指令:
yum -y install epel-releaseloaded plugins: fastestmirror, langpacksepel/x86_64/metalink | 8.6 kb 00:00:00epel | 5.4 kb 00:00:00(1/3): epel/x86_64/updateinfo | 1.0 mb 00:00:00(2/3): epel/x86_64/group_gz | 90 kb 00:00:01(3/3): epel/x86_64/primary_db | 6.9 mb 00:01:00loading mirror speeds from cached hostfile * base: 100.125.0.40 * epel: mirrors.aliyun.com * extras: 100.125.0.40 * updates: 100.125.0.40 * webtatic: uk.repo.webtatic.comresolving dependencies--> running transaction check---> package epel-release.noarch 0:7-11 will be updated---> package epel-release.noarch 0:7-12 will be an update--> finished dependency resolutiondependencies resolved======================================================================================================== package arch version repository size========================================================================================================updating: epel-release noarch 7-12 epel 15 ktransaction summary========================================================================================================upgrade 1 packagetotal download size: 15 kdownloading packages:delta rpms disabled because /usr/bin/applydeltarpm not installed.epel-release-7-12.noarch.rpm | 15 kb 00:00:00running transaction checkrunning transaction testtransaction test succeededrunning transaction updating : epel-release-7-12.noarch 1/2 cleanup : epel-release-7-11.noarch 2/2 verifying : epel-release-7-12.noarch 1/2 verifying : epel-release-7-11.noarch 2/2updated: epel-release.noarch 0:7-12
完成升级7-12。
再次安装
libmcrypt,libmcrypt-devel:
yum install libmcrypt libmcrypt-devel
yum install libmcrypt libmcrypt-develloaded plugins: fastestmirror, langpacksloading mirror speeds from cached hostfile * base: 100.125.0.40 * epel: my.mirrors.thegigabit.com * extras: 100.125.0.40 * updates: 100.125.0.40 * webtatic: uk.repo.webtatic.comresolving dependencies--> running transaction check---> package libmcrypt.x86_64 0:2.5.8-13.el7 will be installed---> package libmcrypt-devel.x86_64 0:2.5.8-13.el7 will be installed--> finished dependency resolutiondependencies resolved======================================================================================================== package arch version repository size========================================================================================================installing: libmcrypt x86_64 2.5.8-13.el7 epel 99 k libmcrypt-devel x86_64 2.5.8-13.el7 epel 13 ktransaction summary========================================================================================================install 2 packagestotal download size: 112 kinstalled size: 302 kis this ok [y/d/n]: ydownloading packages:(1/2): libmcrypt-2.5.8-13.el7.x86_64.rpm | 99 kb 00:00:00(2/2): libmcrypt-devel-2.5.8-13.el7.x86_64.rpm | 13 kb 00:00:00--------------------------------------------------------------------------------------------------------total 1.2 mb/s | 112 kb 00:00:00running transaction checkrunning transaction testtransaction test succeededrunning transaction installing : libmcrypt-2.5.8-13.el7.x86_64 1/2 installing : libmcrypt-devel-2.5.8-13.el7.x86_64 2/2 verifying : libmcrypt-devel-2.5.8-13.el7.x86_64 1/2 verifying : libmcrypt-2.5.8-13.el7.x86_64 2/2installed: libmcrypt.x86_64 0:2.5.8-13.el7 libmcrypt-devel.x86_64 0:2.5.8-13.el7complete!
成功!
最后升级php,指令:
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring
推荐学习:《php视频教程》
以上就是如何解决php5.4 系统升级出错问题的详细内容。
其它类似信息

推荐信息