Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install PHP 7.4 on Ubuntu 16.04 even with Ondrej PPA repository in apache2

Tags:

I am trying to install PHP 7.4 on Ubuntu 16.04 for Apache2 server. To install the 7.4 version, I used PPA ondrej repository as follows:

sudo apt install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt update sudo apt install -y php7.4 php -v 

I get the following error:

Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package php7.4 E: Couldn't find any package by glob 'php7.4' E: Couldn't find any package by regex 'php7.4' 

I tried all the solutions mentioned in answer to this question:

Unable to install PHP 7.3 on Ubuntu 20.04

None of them helped. How can I install this package?

like image 302
Santosh Dangare Avatar asked Jun 10 '21 11:06

Santosh Dangare


People also ask

What version of PHP does Ubuntu 20.04 use?

Verify the installation of PHP on Ubuntu You can now see that version 7.4. 3 of PHP is installed on Ubuntu 20.04 LTS.


1 Answers

Your OS Ubuntu 16.04 (Xenial) is too old. Ondrej PPA only supports the following operating systems (as of 10 June 2021):

Hirsute (21.04), Groovy (20.10), Focal (20.04), Bionic (18.04)

Which is why there is no package found.

like image 64
Tobias Avatar answered Sep 17 '22 15:09

Tobias