Installing PHP 5.6 on CentOS 6.x fails

Haven't install additional PHP for a while and when trying today it fails and I can't figure out has something changed and should the documentation page on https://www.virtualmin.com/documentation/web/multiplephp be changed?

root@ns1.host:/root#
yum install centos-release-scl
Loaded plugins: fastestmirror, presto, priorities
Setting up Install Process
Determining fastest mirrors
* base: mirror.hmc.edu
* updates: mirror.keystealth.org
base                                                                                                 | 3.7 kB     00:00    
base/primary_db                                                                                      | 3.7 MB     00:00    
updates                                                                                              | 3.4 kB     00:00    
updates/primary_db                                                                                   | 5.2 MB     00:00    
virtualmin                                                                                           | 2.5 kB     00:00    
virtualmin/primary_db                                                                                |  91 kB     00:00    
virtualmin-universal                                                                                 | 2.5 kB     00:00    
virtualmin-universal/primary_db                                                                      |  36 kB     00:00    
No package centos-release-scl available.
Error: Nothing to do
root@ns1.host:/root#

So it can't find the package. And the environment is:

cat /etc/*release*
CentOS release 6.8 (Final)
LSB_VERSION=base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.8 (Final)
CentOS release 6.8 (Final)
cpe:/o:centos:linux:6:GA

I also tried to get this done with yum install scl-utils which installs successfully and then installing repository package:

rpm -Uvh https://www.softwarecollections.org/repos/rhscl/rh-php56/epel-6-x86_64/noarch/rhscl-rh-php56-epel-6-x86_64-1-2.noarch.rpm

Unfortunately, both ways didn't work. So how we should go for multiple PHP on 6.x based systems?

Status: 
Active

Comments

unborn's picture
Submitted by unborn on Fri, 03/24/2017 - 22:12 Pro Licensee

forgive me but your centos is well out of date.. isn't the centos default install 7.0-1406? or something like 7? - perhaps you're searching for resources not available to your outdated version... - please upgrade.

source: https://en.wikipedia.org/wiki/CentOS

Edit - the wikipedia page is somehow mentioning only version 7 in green which gave me wrong impression.

CentOS 5, 6, and 7 are all supported and up to date.

PHP 5.6 should definitely work on CentOS 6, and we had recently modified the instructions to incorporate the new SCL way of doing things... so I'm not quite sure why that's not working at the moment. I'm looking into that now.

Okay those still are the current instructions, but if the CentOS "extras" repository had been disabled, it wouldn't be able to install the "centos-release-SCL" package.

You may want to verify that the CentOS "extras" repository is enabled.

unborn's picture
Submitted by unborn on Fri, 03/24/2017 - 14:15 Pro Licensee

on CentOS releases in that wiki page - does not even mentioning the 6...supporting 5 would be shoot in a back.... are you sure andreychek?

Unfortunately, it is not working for me with the following repositories enabled:

base extras updates virtualmin virtualmin-universal

After running yum clean all trying to install the centos-release-scl gives:

yum install centos-release-scl
Loaded plugins: fastestmirror, presto, priorities
Setting up Install Process
Determining fastest mirrors
* base: mirror.keystealth.org
* centosplus: mirror.keystealth.org
* contrib: centos.chicago.waneq.com
* extras: mirrors.cat.pdx.edu
* updates: mirrors.evowise.com
base                                                                                                 | 3.7 kB     00:00    
base/primary_db                                                                                      | 3.7 MB     00:00    
centosplus                                                                                           | 3.4 kB     00:00    
centosplus/primary_db                                                                                | 2.7 MB     00:00    
contrib                                                                                              | 2.9 kB     00:00    
contrib/primary_db                                                                                   | 1.2 kB     00:00    
extras                                                                                               | 3.3 kB     00:00    
extras/primary_db                                                                                    |  30 kB     00:00    
updates                                                                                              | 3.4 kB     00:00    
updates/primary_db                                                                                   | 5.2 MB     00:00    
virtualmin                                                                                           | 2.5 kB     00:00    
virtualmin/primary_db                                                                                |  91 kB     00:00    
virtualmin-universal                                                                                 | 2.5 kB     00:00    
virtualmin-universal/primary_db                                                                      |  36 kB     00:00    
No package centos-release-scl available.
Error: Nothing to do

There is more to this. I found this bug report: https://bugs.centos.org/view.php?id=10925 and my system is exactly CentOS 6.8, however trying yum install centos-release-sclo-rh recommended there does not install anything. So the problem is still there.

I just performed a new CentOS 6 installation, and was able to then install the centos-release-scl package.

You could be seeing an issue with the particular mirror that you're using there.

However, if you are running into a CentOS bug of some sort, you may need to wait for them to sort out what's going on what that.

One last thought -- if you haven't already, you may want to try the solution mentioned by the 3rd comment there, which is to remove the " /etc/yum.repos.d/CentOS-SCL.repo" file is it exists.