错误:新文件 /usr/lib/php/7.0/php.ini-production.cli 不存在!

错误:新文件 /usr/lib/php/7.0/php.ini-production.cli 不存在!

更新系统后我收到此错误:

Setting up php7.0-cli (7.0.5-1+deb.sury.org~trusty+1) ...
Error: The new file /usr/lib/php/7.0/php.ini-production.cli does not exist!
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
dpkg: error processing package php7.0-cli (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php7.0-fpm:
php7.0-fpm depends on php7.0-cli; however:
Package php7.0-cli is not configured yet.

dpkg: error processing package php7.0-fpm (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-cgi:
php7.0-cgi depends on php7.0-cli; however:
Package php7.0-cli is not configured yet.

dpkg: error processing package php7.0-cgi (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0:
php7.0 depends on php7.0-fpm | libapache2-mod-php7.0 | php7.0-cgi; however:

Package php7.0-fpm is not configured yet.
Package libapache2-mod-php7.0 is not installed.
Package php7.0-cgi is not configured yet.

dpkg: error processing package php7.0 (--configure):
dependency problems - leaving unconfigured
E: Sub-process /usr/bin/dpkg returned an error code (1)

我怎样才能解决这个问题?

答案1

经过 2 小时的测试,这对我有用:

  1. 删除(清除)apache 和所有 php 包:

    apt-get purge php*
    apt-get purge apache2
    
  2. 安装这些软件包:

    apt-get install apache2 php7.0 libapache2-mod-php7.0
    

答案2

这是 Ondrej 的 PPA 中的 PHP 7.0.5 包中存在的一个已知问题,即构建损坏。

根据他的错误报告,新建筑刚刚竣工。

再试一次(你可能必须这么做apt-get update),它就会起作用。


如果apt-get update没有帮助,您可能还需要手动删除旧的包缓存:

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

答案3

正如发布于错误报告 apt-get update && apt-get upgrade效果很好!

相关内容