Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while installing php 7.2 in ubuntu 17.04

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'
like image 919
rawathemant Avatar asked Jun 20 '18 11:06

rawathemant


1 Answers

you need to manually add the ondrej PPA to be able to install PHP7.2 on Ubuntu 17

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2

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.

like image 178
hassan Avatar answered Sep 20 '22 01:09

hassan