Linux – Install PHP 5.6 on CentOS 7 – No package php56 available – yum misconfiguration

centos7linuxpackage-managementrepositoryyum

I'm trying to install PHP 5.6.x on my CentOS 7.2.1511 installation.

I've followed this guide:
https://webtatic.com/packages/php56/

For some reason, the php56 cannot be found. I've also tried other repositories, like Remi's RPM repository, but also there no packages are found. It looks like something is wrong with my yum installation.

This is the output of the install command:

> yum install php56 php56-opcache
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.transip.nl
 * epel: ftp.nluug.nl
 * extras: centos.mirror.transip.nl
 * ius: mirror.amsiohosting.net
 * remi: remi.mirrors.cu.be
 * remi-php56: remi.mirrors.cu.be
 * remi-safe: remi.mirrors.cu.be
 * updates: centos.mirror.transip.nl
 * webtatic: uk.repo.webtatic.com
 No package php56 available.
 No package php56-opcache available.
 Error: Nothing to do

The contents of the yum repository directory:

-rw-r--r-- 1 root root 1664 Dec  9  2015 CentOS-Base.repo
-rw-r--r-- 1 root root 1309 Dec  9  2015 CentOS-CR.repo
-rw-r--r-- 1 root root  649 Dec  9  2015 CentOS-Debuginfo.repo
-rw-r--r-- 1 root root  290 Dec  9  2015 CentOS-fasttrack.repo
-rw-r--r-- 1 root root  630 Dec  9  2015 CentOS-Media.repo
-rw-r--r-- 1 root root 1331 Dec  9  2015 CentOS-Sources.repo
-rw-r--r-- 1 root root 1952 Dec  9  2015 CentOS-Vault.repo
-rw-r--r-- 1 root root  957 Jul 23 23:37 epel.repo
-rw-r--r-- 1 root root 1056 Jul 23 23:37 epel-testing.repo
-rw-r--r-- 1 root root 1150 Apr 16  2015 ius-archive.repo
-rw-r--r-- 1 root root 1131 Apr 16  2015 ius-dev.repo
-rw-r--r-- 1 root root 1073 Apr 16  2015 ius.repo
-rw-r--r-- 1 root root 1150 Apr 16  2015 ius-testing.repo
-rw-r--r-- 1 root root 1177 Jun 30 14:25 remi-php70.repo
-rw-r--r-- 1 root root 1177 Jun 30 14:25 remi-php71.repo
-rw-r--r-- 1 root root 2340 Oct 15 19:40 remi.repo
-rw-r--r-- 1 root root  449 Jun 30 14:25 remi-safe.repo
-rw-r--r-- 1 root root  963 Oct  8  2014 webtatic-archive.repo
-rw-r--r-- 1 root root  865 Oct  8  2014 webtatic.repo
-rw-r--r-- 1 root root  963 Oct  8  2014 webtatic-testing.repo

There have been no error messages or anything (except for 'package not found').

Best Answer

Keeping webtatic + IUS + remi enabled can only raise issues.

For remi repository, follow the wizard instructions

And in this case, packages name are:

  • php-* for simple installation (single version)
  • php56-php-* for parallel installation (multiple versions)

But, according to your configuration, if yum is unable to find "php56" which is available in remi-safe (enabled repository), this probably mean you have some exclude directives in the yum configuration (cpanel ?)