2

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?

Community
  • 1
  • 1
J4GD33P 51NGH
  • 630
  • 1
  • 8
  • 24
  • 3
    `sudo yum remove php-cli mod_php php-common`, remove the existing php installation, and then install using your command. – Hackerman Dec 26 '17 at 13:22
  • 1
    i also try removing `php-common` as described [HERE](https://stackoverflow.com/a/24351302/5894421) but got same issue – J4GD33P 51NGH Dec 26 '17 at 13:24
  • Are you trying to use centos6 repos in centos7? – Viktor Khilin Dec 26 '17 at 13:27
  • @Viktorkhilin idk that. how do i check? because this is not my machine – J4GD33P 51NGH Dec 26 '17 at 13:28
  • Try repos https://mirror.webtatic.com/yum/el7/latest.rpm and https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm (7 instead of 6), firstly remove these. – Viktor Khilin Dec 26 '17 at 13:31
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Dec 26 '17 at 15:38
  • Also see [How to update Apache to 2.4.29 using SCL?](https://unix.stackexchange.com/a/412171/56041) on [Unix & Linux Stack Exchange](http://unix.stackexchange.com/). It covers Python, Apache and PHP. You should be able to leave MariaDB at 5.5. – jww Dec 26 '17 at 15:39
  • Thanks @Hackerman, that did the trick for me! – KevinY Jan 04 '18 at 22:37
  • Glad to help @KevinY – Hackerman Jan 05 '18 at 13:57

1 Answers1

0

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
Matzy
  • 353
  • 2
  • 8