using this repo : http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-13.ius.centos6.noarch.rpm for php installation , and for apache i am using amazon linux repo

current version of php :

$ php -v

PHP 5.6.2 (cli) (built: Nov  4 2014 10:01:39) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies

current version of apache :

$ httpd -v 

Server version: Apache/2.4.10 (Amazon)
Server built:   Jul 30 2014 23:57:26

everything is fine upto this level

packages installed for php are :

$ yum list installed | grep php

php56u-bcmath.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-cli.x86_64               5.6.2-3.ius.centos6        @ius                 
php56u-common.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-devel.x86_64             5.6.2-3.ius.centos6        @ius                 
php56u-embedded.x86_64          5.6.2-3.ius.centos6        @ius                 
php56u-enchant.x86_64           5.6.2-3.ius.centos6        @ius                 
php56u-gd.x86_64                5.6.2-3.ius.centos6        @ius                 
php56u-imap.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-intl.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-ldap.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-mbstring.x86_64          5.6.2-3.ius.centos6        @ius                 
php56u-mcrypt.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-mysqlnd.x86_64           5.6.2-3.ius.centos6        @ius                 
php56u-pdo.x86_64               5.6.2-3.ius.centos6        @ius                 
php56u-pear.noarch              1:1.9.5-1.ius.centos6      @ius                 
php56u-pecl-jsonc.x86_64        1.3.6-3.ius.centos6        @ius                 
php56u-pecl-jsonc-devel.x86_64  1.3.6-3.ius.centos6        @ius                 
php56u-pgsql.x86_64             5.6.2-3.ius.centos6        @ius                 
php56u-process.x86_64           5.6.2-3.ius.centos6        @ius                 
php56u-pspell.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-recode.x86_64            5.6.2-3.ius.centos6        @ius                 
php56u-snmp.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-soap.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-tidy.x86_64              5.6.2-3.ius.centos6        @ius                 
php56u-xml.x86_64               5.6.2-3.ius.centos6        @ius           

installed packages for apache are :

$ yum list installed | grep http

httpd24.x86_64                  2.4.10-1.59.amzn1          @amzn-main           
httpd24-tools.x86_64            2.4.10-1.59.amzn1          @amzn-main        

now when i try to install php-extension for apache named as php56u.x86_64

this happens

$ yum install php56u.x86_64   
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                                                | 2.1 kB     00:00     

amzn-updates/latest                                                             | 2.3 kB     00:00     

4361 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check

---> Package php56u.x86_64 0:5.6.2-3.ius.centos6 will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: php56u-5.6.2-3.ius.centos6.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.2.29-1.4.amzn1 will be installed
--> Processing Dependency: httpd-tools = 2.2.29-1.4.amzn1 for package: httpd-2.2.29-1.4.amzn1.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.2.29-1.4.amzn1 will be installed
--> Processing Conflict: httpd24-2.4.10-1.59.amzn1.x86_64 conflicts httpd < 2.4.10
--> Processing Conflict: httpd24-tools-2.4.10-1.59.amzn1.x86_64 conflicts httpd-tools < 2.4.10
--> Finished Dependency Resolution
Error: httpd24-tools conflicts with httpd-tools-2.2.29-1.4.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.29-1.4.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest`
  • You may need to replace your existing httpd packages httpd-2.2.29-1.4 to resolve this issue, but better way you can build php from source files with your existing httpd binaries to keep your existing httpd safe and untouched. – Vaibhav Panmand Nov 20 '14 at 9:02
  • @VaibhavPanmand i think httpd2.4 is installed and this extension i am installing requires httpd2.2 thats where conflicts starts , well i am trying to install php source packages available from php.net/releases – Ashish Singh Nov 21 '14 at 9:58

It looks like php56u from IUS is for Apache 2.2 not 2.4 which is why it is trying to install httpd.x86_64 0:2.2.29-1.4 (Apache 2.2.29) and all the associated tools (httpd-tools.x86_64 0:2.2.29-1.4).

However, those two will conflict with httpd24-2.4.10-1.59 that you've installed from the Amazon repository.

Try the REMI repo - I believe it has both PHP 5.6 and Apache 2.4 for CentOS 6

If it fits the bill, then you'll be wise to remove IUS and Amazon repos and their packages and start again.

If it doesn't work, then some of your options are:

  • Find another repo that has Apache and PHP at the versions you require. I believe Fedora 21 has these. The problem here is that you could end up with many dependencies being dragged in at which point your system becomes a hybrid CentOS-6 / Fedora-21 installation which could be a monster to administer (as you've found out already).

  • Create a RPM Spec file and either build your own RPM or use a service such as Copr to build an RPM for you. Building an RPM means that it will be easier to uninstall at a later date.

  • Build PHP 5.6 from source to work with Apache 2.4

  • Wait for a repo to update to the required versions.

  • 1
    yeah i totally agree with you about different repositories ( amazon and rackspace ) but i tried other repos as well like epel & remi ... but no luck same result ... php-extension(php56.x86_64) depends on httpd version 2.2.x on these reps as well – Ashish Singh Nov 20 '14 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.