Reputation: 2000
hi i want to install php 7.3
on ubuntu 20
for my nginx web server, when i try to install the 7.4
version every thing is fine but for 7.3
i get this error
E: Unable to locate package php7.3
then i run the commands below :
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3
but again it shows that it cant locate the package . does ubuntu 20 supports php 7.3
or below and if yes what can be wrong with mine ??
Upvotes: 2
Views: 1285
Reputation: 922
Solution
Add Ondrej PPA repository to your system.
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Install php7.3 and check it's installed.
sudo apt install -y php7.3
php -v
This also works for php 7.4, php7.2 and php5.6. Just change the relevant digits.
Upvotes: 1