update-rc.d: 错误:insserv 拒绝了脚本头 dpkg:util-linux 包处理错误(--configure):

update-rc.d: 错误:insserv 拒绝了脚本头 dpkg:util-linux 包处理错误(--configure):

我尝试安装升级或一些软件包,但收到错误

E: Sub-process /usr/bin/dpkg returned an error code (1)
 update-rc.d: error: insserv rejected the script header
dpkg: erreur de traitement du paquet util-linux (--configure) :
 le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1
Des erreurs ont été rencontrées pendant l'exécution :
 util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)

请帮助我,我正在使用 ubuntu 14.10。谢谢

答案1

我认为util-linux/etc/init.d 中的 init 脚本缺少 LSB 信息

作为临时的解决方法,您可以找到该脚本并在顶部添加类似的内容

#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          
# Required-Start:    
# Required-Stop:     
# Default-Start:     
# Default-Stop:
# Short-Description: 
### END INIT INFO

但这不是一个完整的解决方案。每当你安装一个将初始化脚本添加到 /etc/init.d 的应用程序时,你都会不断收到这样的错误消息

我遇到了类似的问题,我通过应用此链接上一篇文章中的解决方案解决了该问题https://bugs.launchpad.net/ubuntu/+source/insserv/+bug/467000

请注意,这并不意味着它会在你的案例中起作用。它可能会破坏你的系统

有关 LSB 的信息,请查看https://wiki.debian.org/LSBInitScripts

答案2

如果您粘贴更多信息,将会很有帮助。我在安装任何东西时都遇到了这个问题。

问题是,

Extracting templates from packages: 100%
Setting up util-linux (2.27.1-6ubuntu3.5) ...
insserv: warning: script 'S15solrd' missing LSB tags and overrides
insserv: warning: script 'solrd' missing LSB tags and overrides
insserv: Starting solrd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting solrd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting solrd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting solrd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: Starting solrd depends on rc.local and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service solrd and rc.local if started
insserv:  loop involving service rc.local at depth 12
insserv:  loop involving service solrd at depth 1
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)

从输出来看,我猜我没有正确配置 solrd。所以我删除了 rc.local 或 rc 中与 solrd 相关的所有内容

相关内容