when running
sudo apt-get update
and
sudo apt-get upgrade
I get in red the following error: Failed to start The PHP 7.0 FastCGI Process Manager.
NOTICE: Not enabling PHP 7.0 FPM by default.
NOTICE: To enable PHP 7.0 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.0-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Job for php7.0-fpm.service failed because the control process exited with error code.
See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.0-fpm, action "restart" failed.
● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2017-10-07 12:01:40 PDT; 7ms ago
Docs: man:php-fpm7.0(8)
Process: 15565 ExecStart=/usr/sbin/php-fpm7.0 --nodaemonize --fpm-config /etc/php/7.0/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 15565 (code=exited, status=78)
Oct 07 12:01:40 cubi systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Oct 07 12:01:40 cubi php-fpm7.0[15565]: [07-Oct-2017 12:01:40] ERROR: failed to open configuration file '/etc/php/7.0/fpm/php-fpm.conf': No such …rectory (2)
Oct 07 12:01:40 cubi php-fpm7.0[15565]: [07-Oct-2017 12:01:40] ERROR: failed to load configuration file '/etc/php/7.0/fpm/php-fpm.conf'
Oct 07 12:01:40 cubi php-fpm7.0[15565]: [07-Oct-2017 12:01:40] ERROR: FPM initialization failed
Oct 07 12:01:40 cubi systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=78/n/a
Oct 07 12:01:40 cubi systemd[1]: Failed to start The PHP 7.0 FastCGI Process Manager.
Oct 07 12:01:40 cubi systemd[1]: php7.0-fpm.service: Unit entered failed state.
Oct 07 12:01:40 cubi systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package php7.0-fpm (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
php7.0-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1)
I noticed that I have /etc/php/7.0/
and /etc/php/7.1/
but that only the 7.1
has a fpm
sub-folder in it. Somehow something must be cross-linked somewhere.
How can I fix this?
This worked for me -- (I am running Ubuntu 17.04)
I did a fresh install after removing php. Over all this added a bunch of new folders. Now I have 5.6 7.0 7.1 and 7.2.
source: Migrating from PHP 7.0.x to PHP 7.1.x