2
votes

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?

1
sudo yum remove php-cli mod_php php-common, remove the existing php installation, and then install using your command.Hackerman
i also try removing php-common as described HERE but got same issueJ4GD33P 51NGH
Are you trying to use centos6 repos in centos7?Viktor Khilin
@Viktorkhilin idk that. how do i check? because this is not my machineJ4GD33P 51NGH

1 Answers

0
votes

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