I got this error when run below command
sudo apt install php7.2 php7.2-common php7.2-cli php7.2-fpm
Reading state information… Done
E: Unable to locate package php7.2
E: Couldn't find any package by glob 'php7.2'
E: Couldn't find any package by regex 'php7.2'
E: Unable to locate package php7.2-common
E: Couldn't find any package by glob 'php7.2-common'
E: Couldn't find any package by regex 'php7.2-common'
E: Unable to locate package php7.2-cli
E: Couldn't find any package by glob 'php7.2-cli'
E: Couldn't find any package by regex 'php7.2-cli'
E: Unable to locate package php7.2-fpm
E: Couldn't find any package by glob 'php7.2-fpm'
E: Couldn't find any package by regex 'php7.2-fpm'
Kenil Vasani
you need to manually add the ondrej PPA to be able to install PHP7.2 on Ubuntu 17
Or by compiling it from source by cloning the git repository, checking out to the version that you want, make & make install
for more informations about compiling PHP from source check out how to build/compile PHP from source.