apt-get 给出错误

apt-get 给出错误

当我尝试运行更新、升级或安装时,总是收到错误:

Setting up initscripts (2.88dsf-34) ...
Can't exec "insserv": No such file or directory at /usr/sbin/update-rc.d line 391.
update-rc.d: error: insserv rejected the script header
dpkg: error processing initscripts (--configure):
 subprocess installed post-installation script returned error exit status 255
configured to not write apport reports
                                      Errors were encountered while processing:
 initscripts
E: Sub-process /usr/bin/dpkg returned an error code (1)

之前我尝试升级并收到一份包含此类错误的巨大错误日志:

Preconfiguring packages ...
Setting up initscripts (2.88dsf-34) ...
Can't exec "insserv": No such file or directory at /usr/sbin/update-rc.d line 391.
update-rc.d: error: insserv rejected the script header
dpkg: error processing initscripts (--configure):
 subprocess installed post-installation script returned error exit status 255
configured to not write apport reports
Errors were encountered while processing:
 initscripts
Error in function: 
Setting up acpi-fakekey (0.141-1) ...
Can't exec "insserv": No such file or directory at /usr/sbin/update-rc.d line 406.
update-rc.d: error: insserv rejected the script header
dpkg: error processing acpi-fakekey (--configure):
 subprocess installed post-installation script returned error exit status 255
Setting up kmod (9-2) ...
Can't exec "insserv": No such file or directory at /usr/sbin/update-rc.d line 406.
update-rc.d: error: insserv rejected the script header
dpkg: error processing kmod (--configure):
 subprocess installed post-installation script returned error exit status 255
Setting up dbus (1.6.8-1) ...
Can't exec "insserv": No such file or directory at /usr/sbin/update-rc.d line 406.
update-rc.d: error: insserv rejected the script header
dpkg: error processing dbus (--configure):
 subprocess installed post-installation script returned error exit status 255
dpkg: dependency problems prevent configuration of rhythmbox:
 rhythmbox depends on dbus; however:
  Package dbus is not configured yet.

怎么了?

答案1

我遇到了同样的问题,这里: 在终端中运行

sudo ln -s /usr/lib/insserv/insserv /sbin/insserv

然后运行通常

它解决了我下面的问题,我希望它能解决你的问题。

Setting up initscripts (2.88dsf-34) ...
Can't exec "insserv": No such file or directory at /usr/sbin/update-rc.d line 406.
 update-rc.d: error: insserv rejected the script header
dpkg: error processing initscripts (--configure):
 subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
 initscripts

ln -s /usr/lib/insserv/insserv /sbin/insserv

然后我再次运行突触

Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up initscripts (2.88dsf-34) ...

我现在又遇到了另一个错误

E: /var/cache/apt/archives/
gstreamer0.10-plugins-good_0.10.31-3+nmu1ubuntu1_i386.deb: 
trying to overwrite '/usr/lib/i386-linux-gnu/gstreamer-0.10/libgstcamerabin.so',
which is also in package gstreamer0.10-plugins-bad:i386 0.10.23-7

因此我在 synaptic 中标记了 gstreamer-bad-plugins 以进行删除。到目前为止,一切顺利。 更新:它顺利完成。:D

相关内容