close

[Solved] Couldn’t find any package by glob ‘php7.4’

Hello Guys, How are you all? Hope You all Are Fine. Today I am Just trying to install php in my ubuntu 16.04 for Apache2 server But As I run php -v command I am facing following errorCouldn’t find any package by glob ‘php7.4’ in PHP. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Couldn’t find any package by glob ‘php7.4’ Error Occurs ?

I am Just trying to install php in my ubuntu 16.04 for Apache2 server But As I run php -v command I am facing following error.

Reading package lists… Done
Building dependency tree
Reading state information… Done
Unable to locate package php7.4
Couldn’t find any package by glob ‘php7.4’
Couldn’t find any package by regex ‘php7.4’

How To Solve Couldn’t find any package by glob ‘php7.4’ Error ?

  1. How To Solve Couldn’t find any package by glob ‘php7.4’ Error ?

    To Solve Couldn’t find any package by glob ‘php7.4’ Error If You are trying to install php with Ondrej PPA Then it is only supports the Ubuntu 21.0420.1020.0418.04 You are trying with 16.04 which is too OLD so Long Term Solution is Just update your Ubuntu atleast 18.04 to 21.04. For Now, You can archive this by adding this 3rd party repository to your system Just run this two commands. sudo add-apt-repository ppa:jczaplicki/xenial-php74-temp and sudo apt-get update Now, Run php -v command And now your error should be solved.

  2. Couldn’t find any package by glob ‘php7.4’

    To Solve Couldn’t find any package by glob ‘php7.4’ Error If You are trying to install php with Ondrej PPA Then it is only supports the Ubuntu 21.0420.1020.0418.04 You are trying with 16.04 which is too OLD so Long Term Solution is Just update your Ubuntu atleast 18.04 to 21.04. For Now, You can archive this by adding this 3rd party repository to your system Just run this two commands. sudo add-apt-repository ppa:jczaplicki/xenial-php74-temp and sudo apt-get update Now, Run php -v command And now your error should be solved.

Solution 1: Use 3rd party repository to install php

If You are trying to install php with Ondrej PPA Then it is only supports the Ubuntu 21.04, 20.10, 20.04, 18.04 You are trying with 16.04 which is too OLD so Long Term Solution is Just update your Ubuntu atleast 18.04 to 21.04. For Now, You can archive this by adding this 3rd party repository to your system Just run this two commands.

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

Now, Run php -v command And now your error should be solved.

Solution 2: Use this repo

sudo add-apt-repository ppa:tomvlk/php-archive
sudo apt-get update

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment