Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

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

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?

over 4 years ago · Santiago Trujillo
4 answers
Answer question

0

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.

over 4 years ago · Santiago Trujillo Report

0

You can archive this by adding this 3rd party repository to your system:

sudo add-apt-repository ppa:jczaplicki/xenial-php74-temp
sudo apt-get update

CAUTION:

This is adding an external PPA repository to your system. If you do not trust the maintainer you should not do this, since it possibly exposes your system. Also note that this might work for installing php, but there will not be a guarantee that you recvive updates through it (The word "temp" in the repository name indicates that this is only temporary). I would rather recommend compiling it yourself if you really need to have it installed on 16.04.

As a "Long-Term Solution" you really should update your system.

over 4 years ago · Santiago Trujillo Report

0

I ran into this recently. Luckily, I found a repo containing archives of the original Ondrej PPA. You will be able to install php7.4 and extensions. However, I'd be careful with any archives as they can have a security risk.

sudo add-apt-repository ppa:tomvlk/php-archive
sudo apt-get update
over 4 years ago · Santiago Trujillo Report

0

Here are installation instructions for ZendPHP repository - https://help.zend.com/zendphp/current/content/installation/installation.htm

The ZendPHP installation package replaces Ubuntu 16.04 distribution's PHP and supports PHP 5.6, PHP 7.1, PHP 7.2, PHP 7.3, and PHP 7.4 on Ubuntu 16.04. Zend also offers PHP LTS for versions that are EOL and no longer receiving high and critical security patches

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!