PeriodParser Asked: 2020-04-26 05:45:31 +0800 CST2020-04-26 05:45:31 +0800 CST 2020-04-26 05:45:31 +0800 CST Cant install PHP 7.2 on Ubuntu 20.04 772 I added ondrej PPA. And tried install php 7.2, but looks like PPA has not been updated yet. What are my workarounds? php php7 20.04 3 Answers Voted Airon Gabriel 2020-04-29T10:35:42+08:002020-04-29T10:35:42+08:00 Follow the steps described below 1: add the PPA maintained by Ondrej Surý sudo add-apt-repository ppa:ondrej/php 2: install PHP versions 7.2 sudo apt install php7.2 3: Select the standard version of PHP sudo update-alternatives --set php /usr/bin/php7.2 4: Disable version 7.4 or the one you are using sudo a2dismod php7.4 5: enable version 7.2 sudo a2enmod php7.2 6: Restart the apache server sudo systemctl restart apache2 Hope this helps! PipIWYG 2020-04-27T10:11:01+08:002020-04-27T10:11:01+08:00 You could try adding the eoan/main PPA... Although, this is likely not a preferred route to follow. $ sudo su $ cp /etc/apt/sources.list /etc/apt/sources.list.bkp $ echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu eoan main" >> $ /etc/apt/sources.list $ apt update $ apt install php7.2 php-pear php7.2-gd php7.2-dev php7.2-zip php7.2-mbstring php7.2-mysql php7.2-xml php7.2-curl $ exit Mohammad Ghonchesefidi 2020-05-02T20:28:42+08:002020-05-02T20:28:42+08:00 Today I just realize that with lates ubuntu PPA update older PHP version is available now. So to install php7.3 or 7.2 just sudo apt update and you are ready to go!
Follow the steps described below
1: add the PPA maintained by Ondrej Surý
2: install PHP versions 7.2
3: Select the standard version of PHP
4: Disable version 7.4 or the one you are using
5: enable version 7.2
6: Restart the apache server
Hope this helps!
You could try adding the eoan/main PPA... Although, this is likely not a preferred route to follow.
Today I just realize that with lates ubuntu PPA update older PHP version is available now. So to install php7.3 or 7.2 just sudo apt update and you are ready to go!