在执行apt-get install python-setuptools
或时apt-get upgrade
,大约有十几个依赖性错误,其中排名前三的是:
apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-setuptools is already the newest version.
The following packages were automatically installed
and are no longer required:
update-notifier-common libfile-copy-recursive-perl update-inetd
librpmio0 librpm0 libmpfr1ldbl cpu-checker liblzma1 cvs
librpmbuild0 gnupg-curl libcurl3-gnutls info
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
11 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up procps (1:3.2.8-9ubuntu3) ...
start: Job failed to start
dpkg: error processing procps (--configure):
subprocess installed post-installation script
returned error exit status 1 dpkg: dependency problems prevent
configuration of udev: udev depends on procps;
however: Package procps is not configured yet.
dpkg: error processing udev (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates
its a followup error from a previous failure.
dpkg: dependency problems prevent
configuration of plymouth: plymouth
depends on udev (>= 149-2); however:
Package udev is not configured yet.
dpkg: error processing plymouth
(--configure): dependency problems -
leaving unconfigured No apport report
written because the error message
indicates its a followup error from a
previous failure.
dpkg: dependency problems prevent
configuration of apache2.2-common:
apache2.2-common depends on procps;
however: Package procps is not
configured yet.
dpkg: error processing
apache2.2-common (--configure):
dependency problems - leaving
unconfigured No apport report written
because MaxReports is reached already
pkg: dependency problems prevent
configuration of apache2-mpm-prefork:
apache2-mpm-prefork depends on
apache2.2-common (=2.2.16-1ubuntu3.1);
however: Package apache2.2-common is not configured yet.
dpkg: error processing
apache2-mpm-prefork (--configure):
dependency problems - leaving
unconfigured No apport report written
because MaxReports is reached already
我认为 python-setuptools 已安装,但是有一堆未配置的软件包。如何修复或配置它们?
答案1
从第一个错误开始:
dpkg:错误处理 procps(--configure):子进程安装的安装后脚本返回错误退出状态 1
指运行时发生的错误/var/lib/dpkg/info/procps.postinst。虽然这可能不是最好的解决方案,但您通常可以通过尝试手动运行脚本(或其中的部分)来确定发生了什么。上述故障似乎导致了以下所有问题:
dpkg:依赖性问题阻止了 udev 的配置:udev 依赖于 procps;但是:软件包 procps 尚未配置。
dpkg:错误处理 udev(--configure):依赖性问题 - 未配置没有写入 apport 报告,因为错误消息表明它是上次故障的后续错误。
dpkg:依赖性问题阻止了 plymouth 的配置:plymouth 依赖于 udev(>= 149-2);然而:软件包 udev 尚未配置。
dpkg:错误处理 plymouth(--configure):依赖性问题 - 未配置没有写入 apport 报告,因为错误消息表明它是上次故障的后续错误。
dpkg:依赖性问题阻止了 apache2.2-common 的配置:apache2.2-common 依赖于 procps;然而:软件包 procps 尚未配置。
因此,我会说重新安装 procps 或在安装后脚本中查找错误来源。
答案2
在终端中运行以下命令。
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get update && sudo apt-get upgrade
答案3
答案4
老问题了...我刚遇到这个问题。我尝试更新我的 debian 服务器,但 apache 也遇到了类似的问题。
insserv: warning: script 'K02tomcat' missing LSB tags and overrides
insserv: warning: script 'jira1' missing LSB tags and overrides
insserv: warning: script 'tomcat' missing LSB tags and overrides
insserv: There is a loop between service munin-node and jira1 if stopped
insserv: loop involving service jira1 at depth 2
insserv: loop involving service munin-node at depth 1
insserv: Stopping jira1 depends on munin-node and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
我移动了 /etc/init.d/ 中的两个启动脚本(jira1 和 tomcat)。然后我删除了 Apache2 并重新安装它。在执行此操作之前,我创建了服务器的快照(在虚拟机中运行),并复制了完整的 /etc/apache2 文件夹,只是为了方便,如果我只需要一个文件并且不想放回快照。
奇怪的是,当我删除 apache 时,它仍在运行。Apt-get 仍然说它已被删除。
Package apache2 is not installed, so not removed
因此我手动停止了 apache,然后尝试启动它,但没有成功。当我尝试启动 apache 时,出现了一个错误:
Starting web server: apache2Syntax error on line 14 of /etc/apache2/sites-enabled/test:
Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
httpd (pid 28574) already running
于是我重新安装了 apache2(apt-get install apache2),并升级了(apt-get upgrade)。启动 apache 时错误依旧,无法启动,于是我想我重新安装了 PHP(apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi)。然后它启动了,现在又可以运行了。