mohatt / dashbrew

Vagrant build for developing PHP projects on different PHP versions and configurations
490 stars 38 forks source link

php5-cli is not yet configured #32

Open nathan-van-der-werf opened 9 years ago

nathan-van-der-werf commented 9 years ago

Hello,

I am encountering the following errors:

==> default: [Info] Installing OS package 'php5-mcrypt'
==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directory
==> default: php5_invoke opcache: no action - module was disabled by maintainer for cli SAPI
==> default: Failed to open terminal.debconf: whiptail output the above errors, giving up!
==> default: dpkg: error processing package php5-cli (--configure):
==> default:  subprocess installed post-installation script returned error exit status 255
==> default: dpkg: dependency problems prevent configuration of php5-readline:
==> default:  php5-readline depends on php5-cli (= 5.5.23+dfsg-1+deb.sury.org~trusty+2); however:
==> default:   Package php5-cli is not configured yet.
==> default:
==> default: dpkg: error processing package php5-readline (--configure):
==> default:  dependency problems - leaving unconfigured
==> default: dpkg: dependency problems prevent configuration of php5-fpm:
==> default:  php5-fpm depends on php5-cli; however:
==> default:   Package php5-cli is not configured yet.
==> default:
==> default: dpkg: error processing package php5-fpm (--configure):
==> default:  dependency problems - leaving unconfigured
==> default:
==> default: Creating config file /etc/php5/mods-available/mcrypt.ini with new version
==> default: php5_invoke: Enable module mcrypt for cli SAPI
==> default: php5_invoke: Enable module mcrypt for fpm SAPI
==> default: Errors were encountered while processing:
==> default:  php5-cli
==> default:  php5-readline
==> default:  php5-fpm
==> default: E
==> default: :
==> default: Sub-process /usr/bin/dpkg returned an error code (1)
==> default: [Error] Error occured while installing OS package 'php5-mcrypt'
==> default: [Info] Installing OS package 'php5-gd'
==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directory
==> default: Failed to open terminal.debconf: whiptail output the above errors, giving up!
==> default: dpkg: error processing package php5-cli (--configure):
==> default:  subprocess installed post-installation script returned error exit status 255
==> default: dpkg: dependency problems prevent configuration of php5-fpm:
==> default:  php5-fpm depends on php5-cli; however:
==> default:   Package php5-cli is not configured yet.
==> default:
==> default: dpkg: error processing package php5-fpm (--configure):
==> default:  dependency problems - leaving unconfigured
==> default: dpkg: dependency problems prevent configuration of php5-readline:
==> default:  php5-readline depends on php5-cli (= 5.5.23+dfsg-1+deb.sury.org~trusty+2); however:
==> default:   Package php5-cli is not configured yet.
==> default:
==> default: dpkg: error processing package php5-readline (--configure):
==> default:  dependency problems - leaving unconfigured
==> default:
==> default: Creating config file /etc/php5/mods-available/gd.ini with new version
==> default: php5_invoke: Enable module gd for cli SAPI
==> default: php5_invoke: Enable module gd for fpm SAPI
==> default: Errors were encountered while processing:
==> default:  php5-cli
==> default:  php5-fpm
==> default:  php5-readline
==> default: E
==> default: :
==> default: Sub-process /usr/bin/dpkg returned an error code (1)
==> default: [Error] Error occured while installing OS package 'php5-gd'

My dashbrew environment.yaml is:


---
#
# OS Packages
#
# Packages to install via the OS package manager (apt-get).
#
os::packages:
  vim: true
  php5-mcrypt: true
  php5-gd: true

#
# PHP Builds
#
# A hash containing a list of PHP versions and their configurations
#  to be managed by phpbrew.
#
php::builds:
  5.6.0:
    installed: true
    default: true
    variants:
      - dev
      - mcrypt
      - gd
    extensions:
      xdebug:
        enabled: true
        version: stable
      xhprof:
        enabled: true
        version: latest
      gd:
        enabled: true
        version: stable
    fpm:
      port: 9002
      autostart: true
#
# Apache Modules
#
# Apache modules to install and enable.
#
apache::modules:
  rewrite: true

#
# Nodejs Modules
#
# Nodejs Modules to install via npm.
#
npm::packages:
  grunt-cli: true

#
# Debug mode
#
# Enables extra information during provisioning
#
debug: false

I'm using dashbrew also at home, and there it works (on windows) at my work computer (iMac) it doesn't.

Can someone help me out ?

crittermike commented 9 years ago

I'm getting this too, with basically the same environment.yaml. I'm on OSX (Yosemite) with Vagrant 1.7.2 and Virtualbox 4.3.26.

I also tried manually adding php5-cli to os::packages and ran vagrant provision again, but that didn't seem to change anything -- I still got the same error message.

My workaround for now is to just stick with the system PHP and run sudo apt-get install php5-gd, which works fine for me temporarily since I don't really need any other PHP versions at the moment.

For the record: relevant issue from phpbrew which was closed in favor of this one: https://github.com/phpbrew/phpbrew/issues/484

zverbeta commented 9 years ago

This is a trick

I solved my problem so:

  1. Customize my environment.yaml
---
#
# OS Packages
#
# Packages to install via the OS package manager (apt-get).
#
os::packages:
  vim: true
  php5-mcrypt: true
  php5-gd: true

#
# PHP Builds
#
# A hash containing a list of PHP versions and their configurations
#  to be managed by phpbrew.
#
php::builds:
  5.6.0:
    installed: true
    default: true
    variants:
      - dev
      - mcrypt
      - gd
    extensions:
      xdebug:
        enabled: true
        version: stable
      xhprof:
        enabled: true
        version: latest
    fpm:
      port: 9002
      autostart: true

#
# Apache Modules
#
# Apache modules to install and enable.
#
apache::modules:
  rewrite: true

#
# Nodejs Modules
#
# Nodejs Modules to install via npm.
#
npm::packages:
  grunt-cli: true

#
# Debug mode
#
# Enables extra information during provisioning
#
debug: false

I add mCrypt and GD Library

Next step i run commands list:

vagrant halt
vagrant up

Library loaded but if run command vagrant provision then get error

==> default: [Error] Unable to build php

For solve it should be renamed environment.yaml to environment.yaml.example

Sorry for my English