How to install php7.2 in Ubuntu 19.10
I have recently upgraded to Ubuntu 19.10 from 19.04. When I tried to install some package it asked me to remove many packages by autoremove. So I run the command and it removed the php7.2-fpm.
Now I am unable to install php7.2-fpm.
$ sudo apt-get install php7.2-fpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php7.2-fpm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another sourceI tried to add ondrej PPA. But still it is not working.
Please help.
My netbeans also stopped working.
UPDATE
I am now able to use netbeans by installing JDK13. I am still forced to use PHP7.3. I am not able to use PHP7.2. Someone asked me to show output of sudo apt-get update. So I am posting it here:
xxx@Ubuntu-PC:~$ sudo apt-get update
[sudo] password for xxx:
Hit:1 eoan InRelease
Hit:2 eoan InRelease
Hit:3 eoan-updates InRelease
Hit:4 eoan-security InRelease
Hit:5 eoan InRelease
Hit:6 stable InRelease
Hit:7 stable InRelease
Ign:8 stable InRelease
Hit:9 stable Release
Reading package lists... Done 3 2 Answers
You should use the replacement python package to be able to register ondrej's PPA
sudo apt install software-properties-commonThen register the PPA
add-apt-repository ppa:ondrej/phpNow you can install your PHP packages
sudo apt-get install php7.2 php7.2-fpm php7.2-cli php7.2-xml php7.2-mysqlCheck your available versions
update-alternatives --list php And switch to it
sudo update-alternatives --set php /usr/bin/php7.2 4 sudo apt install software-properties-commonThen register the PPA
add-apt-repository ppa:ondrej/phpmust install additional repository based on webseverfor nginx
add-apt-repository ppa:ondrej/nginx-mainlinefor apache2
add-apt-repository ppa:ondrej/apache2install your PHP packages
sudo apt-get install php7.2 php7.2-fpm php7.2-cli php7.2-xml php7.2-mysqlCheck available versions
update-alternatives --list php switch to php7.2
sudo update-alternatives --set php /usr/bin/php7.2