Php E:子流程/usr/bin/dpkg返回错误代码(1)
尝试卸载Php E:子流程/usr/bin/dpkg返回错误代码(1),php,apache,ubuntu,Php,Apache,Ubuntu,尝试卸载php7.0时,出现以下错误: Reading package lists... Done Building dependency tree Reading state information... Done Package 'php7.0' is not installed, so not removed The following packages were automatically installed and are no longer required: li
php7.0
时,出现以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'php7.0' is not installed, so not removed
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-92 linux-headers-4.4.0-92-generic linux-headers-4.4.0-93 linux-headers-4.4.0-93-generic linux-headers-4.4.0-96
linux-headers-4.4.0-96-generic linux-image-4.4.0-92-generic linux-image-4.4.0-93-generic linux-image-4.4.0-96-generic
linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic linux-image-extra-4.4.0-96-generic
linux-signed-image-4.4.0-92-generic linux-signed-image-4.4.0-93-generic linux-signed-image-4.4.0-96-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libapache2-mod-php7.0 (7.0.22-0ubuntu0.16.04.1) ...
dpkg: error processing package libapache2-mod-php7.0 (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of libapache2-mod-php:
libapache2-mod-php depends on libapache2-mod-php7.0; however:
Package libapache2-mod-php7.0 is not configured yet.
dpkg: error processing package libapache2-mod-php (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libapache2-mod-php7.0
libapache2-mod-php
E: Sub-process /usr/bin/dpkg returned an error code (1)
我使用了以下命令:
apt-get --purge remove php7.0
sudo apt get remove php7.0
我搜索了整个互联网,尝试了所有的解决方案,但没有找到正确的解决方案。这主要是因为某些包或依赖项在包管理器中卡住了 尝试以下命令(使用
sudo
):
然后尝试使用以下命令卸载php7.0
:
apt-get --purge remove php7.0
不工作仍然显示相同的错误时,上述命令run@YatharthaJoshi这个错误似乎与libapachephp模块有关。尝试禁用并清除该选项too@YatharthaJoshi随时