简体   繁体   中英

Unable to update PHP from 5.4 to higher version in CentOs 7

I'm using CentOS Linux release 7.4.1708 (Core) and for some of my project tasks i need PHP higher than 5.4 but unable to update it. i used these commands:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

and then:

yum install php56w php56w-opcache

as described HERE

but getting this error:

Error: php56w-common conflicts with php-common-5.4.16-43.el7_4.x86_64
Error: Package: php56w-5.6.32-1.w6.x86_64 (webtatic)
Requires: httpd-mmn = 20051115
Installed: httpd-2.4.6-67.el7.centos.6.x86_64 (@updates)
httpd-mmn = 20120211
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
Available: httpd-2.4.6-67.el7.centos.x86_64 (base)
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
httpd-mmn = 20120211
Available: httpd-2.4.6-67.el7.centos.2.x86_64 (updates)
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
httpd-mmn = 20120211
Available: httpd-2.4.6-67.el7.centos.5.x86_64 (updates)
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
httpd-mmn = 20120211
Error: Package: php56w-common-5.6.32-1.w6.x86_64 (webtatic)
Requires: libgmp.so.3()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

what can i do now for updating it?

To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS 7.x version to yum:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Than execute yum install:

yum install php70w php70w-mysql php70w-common php70w-xml php70w-mbstring

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM