Question

Unable to locate package php7.4

I am trying to upgrade php7.4 version but i am getting this issue “Unable to locate package php7.4” on debian Debian 9.4

and i check shources.list

deb http://mirrors.digitalocean.com/debian stretch main contrib non-free deb-src http://mirrors.digitalocean.com/debian stretch main contrib non-free

deb http://security.debian.org stretch/updates main contrib non-free deb-src http://security.debian.org stretch/updates main contrib non-free deb http://mirrors.digitalocean.com/debian stretch-updates main contrib non-free deb-src http://mirrors.digitalocean.com/debian stretch-updates main contrib non-free

wrong on shources.list or what? could you solve please?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @dwiady,

In order to install PHP 7.4, you need to download and store PPA repository in a file on your Debian Server + the GPG key. To do so, run the following commands:

sudo apt -y install lsb-release apt-transport-https ca-certificates 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

Once you’ve done this, add the repository:

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

Now Update your System and install your PHP version:

sudo apt update
sudo apt -y install php7.4

Regards, KFSys