5

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 source

I 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 http://in.archive.ubuntu.com/ubuntu eoan InRelease                       
Hit:2 http://ppa.launchpad.net/ondrej/php/ubuntu eoan InRelease                
Hit:3 http://in.archive.ubuntu.com/ubuntu eoan-updates InRelease               
Hit:4 http://security.ubuntu.com/ubuntu eoan-security InRelease                
Hit:5 http://archive.canonical.com/ubuntu eoan InRelease                       
Hit:6 http://packages.microsoft.com/repos/vscode stable InRelease              
Hit:7 https://deb.opera.com/opera-stable stable InRelease           
Ign:8 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:9 http://dl.google.com/linux/chrome/deb stable Release
Reading package lists... Done

2 Answers2

9

You should use the replacement python package to be able to register ondrej's PPA

sudo apt install software-properties-common

Installing the package

Then register the PPA

add-apt-repository ppa:ondrej/php

Now you can install your PHP packages

sudo apt-get install php7.2 php7.2-fpm php7.2-cli php7.2-xml php7.2-mysql

Check your available versions

update-alternatives --list php 

And switch to it

sudo update-alternatives --set php /usr/bin/php7.2

Everything is working now

ADI
  • 101
0
sudo apt install software-properties-common

Then register the PPA

add-apt-repository ppa:ondrej/php

must install additional repository based on websever for nginx

add-apt-repository ppa:ondrej/nginx-mainline

for apache2

add-apt-repository ppa:ondrej/apache2

install your PHP packages

sudo apt-get install php7.2 php7.2-fpm php7.2-cli php7.2-xml php7.2-mysql

Check available versions

update-alternatives --list php 

switch to php7.2

sudo update-alternatives --set php /usr/bin/php7.2
gman
  • 2,276
  • 4
  • 27
  • 39