Playbook server failed: Install PHP 7.0

Hello,
I got an issue when i used the playbook server: The process dies when it try to install php 7.
Here the error:

‘/usr/bin/apt-get -y -o “Dpkg::Options::=–force-confdef” -o “Dpkg::Options
::=–force-confold” --force-yes install ‘php7.0-fpm’’ failed: W: --force-yes
is deprecated, use one of the options starting with --allow instead.
E: Sub-process /usr/bin/dpkg returned an error code (1)

W: --force-yes is deprecated, use one of the options starting with --allow
instead.
E: Sub-process /usr/bin/dpkg returned an error code (1)

failed: [52.51.93.215] (item=[u’php7.0-cli’, u’php7.0-common’, u’php7.0-curl’, u’php7.0-dev’, u’php7.0-fpm’, u’php7.0-gd’, u’php7.0-mbstring’, u’php7.0-mcrypt’, u’php7.0-mysql’, u’php7.0-opcache’, u’php7.0-xml’, u’php7.0-xmlrpc’, u’php7.0-zip’]) => {“cache_update_time”: 0, “cache_updated”: false, “failed”: true, “item”: [“php7.0-cli”, “php7.0-common”, “php7.0-curl”, “php7.0-dev”, “php7.0-fpm”, “php7.0-gd”, “php7.0-mbstring”, “php7.0-mcrypt”, “php7.0-mysql”, “php7.0-opcache”, “php7.0-xml”, “php7.0-xmlrpc”, “php7.0-zip”], “stdout”: “Reading package lists…\nBuilding dependency tree…\nReading state information…\nphp7.0-fpm is already the newest version (7.0.9-1+deb.sury.org~xenial+1).\n0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.\n1 not fully installed or removed.\nAfter this operation, 0 B of additional disk space will be used.\nSetting up php7.0-fpm (7.0.9-1+deb.sury.org~xenial+1) …\r\nNot replacing deleted config file /etc/php/7.0/fpm/php.ini\r\nJob 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.\r\ninvoke-rc.d: initscript php7.0-fpm, action "restart" failed.\r\ndpkg: error processing package php7.0-fpm (–configure):\r\n subprocess installed post-installation script returned error exit status 1\r\nErrors were encountered while processing:\r\n php7.0-fpm\r\n”, “stdout_lines”: [“Reading package lists…”, “Building dependency tree…”, “Reading state information…”, “php7.0-fpm is already the newest version (7.0.9-1+deb.sury.org~xenial+1).”, “0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.”, “1 not fully installed or removed.”, “After this operation, 0 B of additional disk space will be used.”, “Setting up php7.0-fpm (7.0.9-1+deb.sury.org~xenial+1) …”, “Not replacing deleted config file /etc/php/7.0/fpm/php.ini”, “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.”, “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"]}

Any idea ?

  1. Did you try it again?
  2. Is this the first provision on a new server or has it been provisioned before?

Yes, i tried many times without success…
It’s a first provision… But I got a first issue with “Start php7.0-fpm service”:

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.

fatal: [52.51.93.215]: FAILED! => {“changed”: false, “failed”: true}

Then i uninstall and reinstall php7.0-fpm to try to fix the issue and now I got this issue.

And this is on a bare/stock Ubuntu version? 14.04 or 16.04?

It’s Ubuntu 16.04 Xenial

I just update my Trellis repo but I get still the same issue… :-/

Maybe it’s related to this issue: Deployment issues with php-fpm

But all is fine in my sudo files :-/

When i do sudo systemctl status php7.0-fpm.service
I get:
failed to open configuration file ‘/etc/php/7.0/fpm/php-fpm.conf’: No such file or directory (2)
ERROR: failed to load configuration file ‘/etc/php/7.0/fpm/php-fpm.conf’

Finally I just resolve my issue with:

sudo apt-get purge php.*

7 Likes

Had this issue just now as well. Provisioning again locally did not help. Destroyed the box and did a vagrant up again. That worked for me. Only now I am having it on provisioning production as well… Trying the re provision again now as deploying failed after I had that PHP7 error. Did do a sudo apt-get purge php.* but that did not help. Provisioning the second time did do the trick and then deployment worked as well.

1 Like