6

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?

3 Answers 3

8

You should do

sudo yum install php56w php56w-common ...

instead of

sudo yum install php php-common, ...

1
  • 1
    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. Jul 20, 2016 at 21:49
5

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.

4
  • He also should disable the webtatic repository, lest some of those conflicting packages get installed. Nov 25, 2015 at 16:57
  • @Remi thanks your repo site is brilliant! thanks for taking the time to answer this question :-)
    – Zabs
    Nov 25, 2015 at 17:04
  • 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.
    – Ynhockey
    May 29, 2016 at 12:04
  • @Ynhockey all the dependencies are in the "remi-safe" repository, which is enabled by default. Feb 2, 2017 at 8:18
0

Cheers guys - I had already found a solution before I read your posts, so used the method from this site

https://www.mojowill.com/geek/howto-install-php-5-4-5-5-or-5-6-on-centos-6-and-centos-7/

In a nutshell I did the following:

CentOS 6 installation

wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Enable the repo Modify the /etc/yum.repos.d/remi.repo file

[remi]
name=Les RPM de remi pour Enterprise Linux 6 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Then in the same file there is a section for php56 and I set the enabled flag from 0 to 1 and voila! Next time I ran the yumo install command it all went through without any errors.

e.g

sudo yum install php php-gd php-mysql php-mcrypt
1
  • Notice that enabling "remi" is not more required, all dependencies are in base, epel and remi-safe (which is enabled by default) Nov 25, 2015 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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