I can’t install PHP-FPM on Ubuntu

Asked

Viewed 378 times

0

When I try to turn the remote sudo apt install php5.6-fpm, I’m getting the following message:

Some packages could not be installed. This may mean that you requested an impossible situation or, if you are using the unstable distribution, which some required packages were not created or removed from "Incoming". The following information can help resolve the situation:

The following packages have different dependencies: php-fpm : Depends on: php7.0-fpm but will not be installed E: Unable to fix issues, you kept (hold) broken packages.

But I don’t want to install the php7.0-fpm, i just want to install for version php5.6 of PHP.

I also tried to run the command sudo apt install php5.6-fpm, but 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 only available from another source

E: The php5.6-fpm package does not have an installation candidate

I remember being able to install PHP-FPM for version 5.6 of PHP.

Someone knows how to fix this?

Observing: I don’t know yet how to solve this (and if this is the problem), but in my Ubuntu, whenever I update PHP, it installs "free" versions 7.0 and 7.1. Therefore, I have these three installed on my machine!

  • 1

    The current versions of Ubunto are no longer supporting PHP 5.6, only 7, to install it you want to search for an alternative repository.

  • Can’t be via ppa ? sudo add-apt-Repository ppa:Ondrej/php /// sudo apt-get update //// sudo apt-get install php5.6-fpm

  • @Anthraxisbr put there, it worked :)

  • 1

    @Anthraxisbr I think it happened because I upgraded the Ubuntu distro to the 17, it must have removed the old PPA!

  • @Wallacemaxters I haven’t updated mine yet, I didn’t know I lost the ppas, good to know so I don’t upgrade kk

1 answer

2


The latest versions of Ubuntu do not support PHP 5.6 natively, only 7.0+, but you can still install the 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
  • It worked here. It seems that when installing the new version of Ubuntu the settings I had already made for that repository were removed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.