I can not install PHP-FPM on Ubuntu

0

When I try to run the command sudo apt install php5.6-fpm , I'm getting the following message:

  

Some packages could not be installed. This may mean that   you asked for an impossible situation or, if you are using the   that some required packages were not   created yet or were taken from the "Incoming".   The following information can help resolve the situation:

     

The following packages have mismatched dependencies:    php-fpm: Depends: php7.0-fpm but will not install   E: Impossible to fix problems, you kept (hold) broken packages.

But I do not want to install php7.0-fpm , I just want to install for the php5.6 version of PHP.

I also tried to run the command sudo apt install php5.6-fpm , however I get another error message:

  

The php5.6-fpm package is not available, but is referenced by another package.   This may mean that the package is missing, has become obsolete, or   is available only from another source

     

E: Package 'php5.6-fpm' has no candidate for installation

I remember installing PHP-FPM for version 5.6 of PHP.

Does anyone know how to solve this?

Note : I do not know yet how to solve this (and if that is the problem), but in my Ubuntu, whenever I update PHP, it installs "toast" versions 7.0 e 7.1 . So I have these three installed on my machine!

    
asked by anonymous 02.10.2017 / 14:39

1 answer

2

The latest versions of Ubuntu do not support PHP 5.6 natively, only 7.0 +, but you can still install dependencies and components via PPAs.

For php-fpm:

sudo add-apt-repository ppa:ondrej/php

sudo apt-get update

sudo apt-get install php5.6-fpm
    
02.10.2017 / 14:50