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 stretch main contrib non-free deb-src stretch main contrib non-free

deb stretch/updates main contrib non-free deb-src stretch/updates main contrib non-free deb stretch-updates main contrib non-free deb-src stretch-updates main contrib non-free

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

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

Once you’ve done this, add the repository:

echo "deb $(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