php56w-common conflicts with older version of php (Centos)

45,612

Solution 1

You should do

sudo yum install php56w php56w-common ...

instead of

sudo yum install php php-common, ...

Solution 2

Using remi repository, you need to enable the repository matching the wanted version, so for 5.6:

yum-config-manager --enable remi-php56

Then use the usual yum command.

Share:
45,612

Related videos on Youtube

Zabs
Author by

Zabs

PHP Developer

Updated on September 18, 2022

Comments

  • Zabs
    Zabs over 1 year

    I am trying to update my vagrant box to use PHP 5.6, and I am basically doing the following process on the command line.

    • sudo yum remove php* (remove PHP)
    • wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm (Installs the latest remi repo:) rpm -Uvh remi-release-6*.rpm
    • sudo yum install php php-common php-devel php-fpm php-gd php-mbstring php-mcrypt php-mysqlnd php-pdo php-pear php-soap php-xml php-pecl-apcu php-pecl-xdebug php-pecl-amqp

    The first two steps seem fine however on the final step when doing the 'setup install process' I get the following error :

    Error: php56w-common conflicts with php-common-5.3.3-46.el6_6.x86_64
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest
    

    I need all of the modules above compatible with PHP 5.6, can anyone suggest what I should do next to get this working?

  • Michael Hampton
    Michael Hampton over 8 years
    He also should disable the webtatic repository, lest some of those conflicting packages get installed.
  • Zabs
    Zabs over 8 years
    @Remi thanks your repo site is brilliant! thanks for taking the time to answer this question :-)
  • Remi Collet
    Remi Collet over 8 years
    Notice that enabling "remi" is not more required, all dependencies are in base, epel and remi-safe (which is enabled by default)
  • Ynhockey
    Ynhockey almost 8 years
    Note: The above doesn't automatically enable the basic remi repository, which is necessary to install some dependencies for the GD library. One should enable the remi repo as well.
  • AVProgrammer
    AVProgrammer almost 8 years
    yum list available 'php56w-*' and look for the package(s) you want. The architecture extension (eg. .x86_64) is not necessary for the yum install command.
  • Remi Collet
    Remi Collet about 7 years
    @Ynhockey all the dependencies are in the "remi-safe" repository, which is enabled by default.