0

I've tried reinstalling PHP5.6 a dozen times now with

sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`

Nothing seems to help. Tried installing PHP7 - no luck.

Error I get

    $ apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up php5.6-cli (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...
Error: The new file /usr/lib/php/5.6/php.ini-production.cli does not exist!
dpkg: error processing package php5.6-cli (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5.6-fpm:
 php5.6-fpm depends on php5.6-cli; however:
  Package php5.6-cli is not configured yet.

dpkg: error processing package php5.6-fpm (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5.6:
 php5.6 depends on php5.6-fpm | libapache2-mod-php5.6 | php5.6-cgi; however:
  Package php5.6-fpm is not configured yet.
  Package libapache2-mod-php5.6 is not installed.
  Package php5.6-cgi is not installed.

dpkg: error processing package php5.6 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5.6-json:
 php5.6-json depends on phpapi-20131226; however:
  Package phpapi-20131226 is not installed.
  Package php5.6-fpm which provides phpapi-20131226 is not configured yet.
  Package php5.6-cli which provides phpapi-20131226 is not configured yet.

dpkg: error processing package php5.6-json (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 php5.6-cli
 php5.6-fpm
 php5.6
 php5.6-json
E: Sub-process /usr/bin/dpkg returned an error code (1)

After wiping PHP, trying to install a fresh PHP 5.6:

$ apt-get install php5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  php-common php5.6-cli php5.6-common php5.6-fpm php5.6-json php5.6-opcache
  php5.6-readline
Suggested packages:
  php-pear
The following NEW packages will be installed:
  php-common php5.6 php5.6-cli php5.6-common php5.6-fpm php5.6-json
  php5.6-opcache php5.6-readline
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,318 kB of archives.
After this operation, 13.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Selecting previously unselected package php-common.
(Reading database ... 38500 files and directories currently installed.)
Preparing to unpack .../php-common_1%3a36+deb.sury.org~trusty+1_all.deb ...
Unpacking php-common (1:36+deb.sury.org~trusty+1) ...
Selecting previously unselected package php5.6-common.
Preparing to unpack .../php5.6-common_5.6.20+dfsg-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5.6-common (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package php5.6-opcache.
Preparing to unpack .../php5.6-opcache_5.6.20+dfsg-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5.6-opcache (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package php5.6-readline.
Preparing to unpack .../php5.6-readline_5.6.20+dfsg-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5.6-readline (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package php5.6-cli.
Preparing to unpack .../php5.6-cli_5.6.20+dfsg-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5.6-cli (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package php5.6-json.
Preparing to unpack .../php5.6-json_1.3.9-2+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5.6-json (1.3.9-2+deb.sury.org~trusty+1) ...
Selecting previously unselected package php5.6-fpm.
Preparing to unpack .../php5.6-fpm_5.6.20+dfsg-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking php5.6-fpm (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...
Selecting previously unselected package php5.6.
Preparing to unpack .../php5.6_5.6.20+dfsg-1+deb.sury.org~trusty+1_all.deb ...
Unpacking php5.6 (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up php-common (1:36+deb.sury.org~trusty+1) ...
Setting up php5.6-common (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...

Creating config file /etc/php/5.6/mods-available/calendar.ini with new version

Creating config file /etc/php/5.6/mods-available/ctype.ini with new version

Creating config file /etc/php/5.6/mods-available/exif.ini with new version

Creating config file /etc/php/5.6/mods-available/fileinfo.ini with new version

Creating config file /etc/php/5.6/mods-available/ftp.ini with new version

Creating config file /etc/php/5.6/mods-available/gettext.ini with new version

Creating config file /etc/php/5.6/mods-available/iconv.ini with new version

Creating config file /etc/php/5.6/mods-available/pdo.ini with new version

Creating config file /etc/php/5.6/mods-available/phar.ini with new version

Creating config file /etc/php/5.6/mods-available/posix.ini with new version

Creating config file /etc/php/5.6/mods-available/shmop.ini with new version

Creating config file /etc/php/5.6/mods-available/sockets.ini with new version

Creating config file /etc/php/5.6/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/5.6/mods-available/sysvsem.ini with new version

Creating config file /etc/php/5.6/mods-available/sysvshm.ini with new version

Creating config file /etc/php/5.6/mods-available/tokenizer.ini with new version
Setting up php5.6-opcache (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...

Creating config file /etc/php/5.6/mods-available/opcache.ini with new version
Setting up php5.6-readline (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...

Creating config file /etc/php/5.6/mods-available/readline.ini with new version
Setting up php5.6-cli (5.6.20+dfsg-1+deb.sury.org~trusty+1) ...
update-alternatives: using /usr/bin/php5.6 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar5.6 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar5.6 to provide /usr/bin/phar.phar (phar.phar) in auto mode
Error: The new file /usr/lib/php/5.6/php.ini-production.cli does not exist!
dpkg: error processing package php5.6-cli (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5.6-fpm:
 php5.6-fpm depends on php5.6-cli; however:
  Package php5.6-cli is not configured yet.

dpkg: error processing package php5.6-fpm (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5.6:
 php5.6 depends on php5.6-fpm | libapache2-mod-php5.6 | php5.6-cgi; however:
  Package php5.6-fpm is not configured yet.
  Package libapache2-mod-php5.6 is not installed.
  Package php5.6-cgi is not installed.

dpkg: error processing package php5.6 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5.6-json:
 php5.6-json depends on phpapi-20131226; however:
  Package phpapi-20131226 is not installed.
  Package php5.6-fpm which provides phpapi-20131226 is not configured yet.
  Package php5.6-cli which provides phpapi-20131226 is not configured yet.

dpkg: error processing package php5.6-json (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 php5.6-cli
 php5.6-fpm
 php5.6
 php5.6-json
E: Sub-process /usr/bin/dpkg returned an error code (1)

System Info:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:    14.04
Codename:   trusty
You have new mail.

Edit:

Looks like it was a repository issue. 12 hours later I did apt-get update and apt-get upgrade, - now everything works properly.

4
  • It seems that you are mixing php-common and php5.6 packages from different repos. Have you tried apt-get install php5.6 php5.6-cli php5.6-common php5.6-fpm php5.6-json php5.6-opcache php5.6-readline ?
    – ALex_hha
    Mar 31, 2016 at 18:59
  • Just tried that - exactly the same problem. Error: The new file /usr/lib/php/5.6/php.ini-production.cli does not exist!
    – pyronaur
    Mar 31, 2016 at 19:06
  • What are the contents of /etc/apt/sources.list? Mar 31, 2016 at 19:26
  • @TeroKilkanen pastebin.com/GdBhJ1a9
    – pyronaur
    Mar 31, 2016 at 19:37

0

You must log in to answer this question.

Browse other questions tagged .