安装,升级或autoremove时出错:insserv警告:脚本’K01runlcactivator’和’runlcactivator’

我在尝试安装Inkscape或安装任何软件时看到这些错误。

当我尝试使用sudo apt-get install language-pack-en-base时,它会显示相同的错误 。

我也试过sudo dpkg-reconfigure locales ,然后尝试安装Inkscape – 但它无法正常工作。

 abhilash@abhilash-Inspiron-3542:~$ sudo apt-get install inkscape [sudo] password for abhilash: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: gawk libgsl2 libgtkmm-2.4-1v5 libgtkspell0 libimage-magick-perl libimage-magick-q16-perl libmagick++-6.q16-5v5 libwmf-bin python-numpy transfig Suggested packages: gawk-doc pstoedit dia | dia-gnome libsvg-perl libxml-xql-perl python-uniconvertor ruby gsl-ref-psdoc | gsl-doc-pdf | gsl-doc-info | gsl-ref-html imagemagick-doc gfortran python-dev python-nose python-numpy-dbg python-numpy-doc xfig The following NEW packages will be installed: gawk inkscape libgsl2 libgtkmm-2.4-1v5 libgtkspell0 libimage-magick-perl libimage-magick-q16-perl libmagick++-6.q16-5v5 libwmf-bin python-numpy transfig 0 upgraded, 11 newly installed, 0 to remove and 158 not upgraded. 8 not fully installed or removed. Need to get 0 B/16.9 MB of archives. After this operation, 107 MB of additional disk space will be used. Do you want to continue? [Y/n] y Setting up util-linux (2.27.1-6ubuntu3.3) ... insserv: warning: script 'K01runlcactivator' missing LSB tags and overrides insserv: warning: script 'runlcactivator' missing LSB tags and overrides insserv: There is a loop between service plymouth and procps if started insserv: loop involving service procps at depth 2 insserv: loop involving service udev at depth 1 insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: loop involving service networking at depth 4 insserv: There is a loop between service plymouth and urandom if started insserv: loop involving service urandom at depth 4 insserv: loop involving service mountdevsubfs at depth 2 insserv: There is a loop at service runlcactivator if started insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: There is a loop between service runlcactivator and dns-clean if started insserv: loop involving service dns-clean at depth 1 insserv: Starting runlcactivator depends on plymouth and therefore on system facility `$all' which can not be true! insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header dpkg: error processing package util-linux (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: util-linux E: Sub-process /usr/bin/dpkg returned an error code (1) abhilash@abhilash-Inspiron-3542:~$ 

有人告诉我 –

问题是你被困在启动顺序。

这是我在查看文件时看到的内容[runlcactivator]

现在请建议我如何“从/etc/init.d/和/ etc / rc?文件中完全清除程序和脚本。” – 正如答案中所建议的那样? 执行此操作的命令行是什么?

我不熟悉代码,所以如果说明是具体的,我可以按原样跟随它们。 谢谢你的帮助!

首先,问题是您陷入了启动顺序。

引导排序方法在安装或升级期间决定。 如果所有已安装的init.d脚本的LSB标头声明的依赖项中没有循环,并且没有过时的脚本,则系统将转换为基于依赖项的引导顺序。 我们要检查

  1. 循环依赖:在>时发生

    • 某些脚本中缺少LSB标记或LSB标记中存在错误,例如缺少Required-Start:Required-Stop:标记

    • 一些脚本依赖于依赖于系统工具$all其他脚本,这不是真的,因为依赖于$all的脚本在启动时最后加载。 由于它最后加载,没有什么可以依赖它。 因此,它弄乱了基于依赖的引导序列。

  2. 过时的脚本:发生时

    • 一些软件包正在升级到更新版本,可能不会使用/etc/init.d/的脚本而维护者可能错过了删除旧脚本的代码。 不是我们的错误。

事业肯定是外国的。 转到/etc/init.d并查看与runlcactivator对应的文件,并确认它有一个LSB​​注释,其中包括runlcactivatorRequired-Start / Required-Stop (至少为空), Default-Start/Default-Stop ,如下所示。

 ### BEGIN INIT INFO # Provides : runlcactivator # Required-Start : # Required-Stop : # Default-Start : 2 3 4 5 # Default-Stop : 0 1 6 # Short-Description : runlcactivator # Description : runlcactivator ### END INIT INFO 

如果它不在那里你可以添加LSB注释或从/etc/init.d//etc/rc?完全清除程序和脚本/etc/rc? 文件。 有两个脚本: K01runlcactivatorrunlcactivator

请注意, 由于 Unix和Linux SE上的insserv ,我无法用无法安装任何使用apt-get的东西来解决这个问题。

当我尝试在我的ubuntu系统上安装Airtel 4G加密狗时,我遇到了同样的问题,尽管它从未奏效。

我移动或说删除了

/etc/init.d/runlcactivator

从该位置文件,然后尝试安装软件包,我能够顺利安装包。