I tried using below PPA repository below.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install -y php7.4 php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath
I am getting these errors.
E: Unable to locate package php7.4-cli
E: Couldn't find any package by glob 'php7.4-cli'
E: Couldn't find any package by regex 'php7.4-cli'
E: Unable to locate package php7.4-json
E: Couldn't find any package by glob 'php7.4-json'
E: Couldn't find any package by regex 'php7.4-json'
I am easily able to install it on newer versions of Ubuntu.
I tried installing php7.4 and php7.4-fpm and I am getting errors. I might a fix or another alternative solution.
Please install software-properties-common first
After the above ,
then either execute
or, if you wish
Additional Comments
if your apt is out-of-date, please execute the following 2 lines first, before installing software-properties-common
If unfortunatley the binaries are removed (it happens) you may need to either (1) compile it (the old software version) by yourself, or (2) upgrade your OS distribution; or (3) use the archive . See this post in Stack Exchange network and please also perform a web search such as
PHP Ondrej Archiveto find the archive resource you really needOne of the links will be
Please note that it's not any kind of official repository so use it at the your own risk