-
-
Save mort3za/a27376bbaeea03b41712f44a2030ede8 to your computer and use it in GitHub Desktop.
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install php5.6 | |
php --version | |
sudo apt-get install php5.6-curl php5.6-xml | |
sudo apt-get install composer |
Not working:
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 8 not upgraded.
E: Unable to locate package php5.6-curl
E: Couldn't find any package by glob 'php5.6-curl'
E: Couldn't find any package by regex 'php5.6-curl'
E: Unable to locate package php5.6-xml
E: Couldn't find any package by glob 'php5.6-xml'
E: Couldn't find any package by regex 'php5.6-xml'
ppa:ondrej/php not support ubuntu 18.04
Not working: 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 8 not upgraded.
E: Unable to locate package php5.6-curl E: Couldn't find any package by glob 'php5.6-curl' E: Couldn't find any package by regex 'php5.6-curl' E: Unable to locate package php5.6-xml E: Couldn't find any package by glob 'php5.6-xml' E: Couldn't find any package by regex 'php5.6-xml'
if you are using docker, you can´t install the extensions like php5.6-{xml,bz2, etc...}, you need to write the full name of each extension
this solution is working for please few more commands ,,, let me add in this
#!/bin/bash
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6
php --v
sudo apt-get install php5.6-curl php5.6-xml
sudo apt-get install composer
sudo apt-get install php5.6-pgsql
sudo systemctl restart apache2