1

My main aim is to install php5.6 while i am having php7.2 already in my laptop.i tried to install it but it's not working in ubuntu 18.04.

the commands which i ran are given below--

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install  php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 

the issue which i got after this is given below-

Reading package lists... Done

Building dependency tree       

Reading state information... Done

Note, selecting 'php5.6-json' for regex 'php5.6'

Note, selecting 'php5.6-common' for regex 'php5.6'

0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.c
brombeer
  • 8,716
  • 5
  • 21
  • 27
Aman Verma
  • 11
  • 1
  • It sounds to me like those packages are probably already installed then - have you checked? – ADyson Jul 05 '23 at 10:13
  • nothing is installed related to php5.6 – Aman Verma Jul 05 '23 at 11:16
  • It should be noted also that since 18.04 is out of support, it's possible the repository maintainer has now removed those packages which were compatible with 18.04. Although that should result in a different message. The message you're seeing normally occurs when all the requested packages are already installed and up to date. – ADyson Jul 05 '23 at 11:34
  • what can be a solution now as i need php5.6 to run my code – Aman Verma Jul 05 '23 at 11:44
  • 1
    I would strongly recommend upgrading to a supported version of Ubuntu, and also upgrading to a supported version of PHP. You've had many, many years to plan for this - 5.6 went out of support in 2018. There is really no reason to still need it. But if you _must_ use it for the time being, it will likely be easier to install it on a current Ubuntu version, via that repository. – ADyson Jul 05 '23 at 11:48
  • But in the meantime, I would still advise you to double-check if the package is already installed, via one of the methods [listed here](https://askubuntu.com/a/423556). – ADyson Jul 05 '23 at 11:48

0 Answers0