Ubuntu不知道什么原因,不能用 apt-get install 安装任何软件了,并且在屏幕上输出海量错误信息,非常迷惑人,例如下面这一例:
insserv: Starting vpnagentd_init depends on plymouth and therefore on system facility `$all' which can not be true!insserv: There is a loop between service vpnagentd_init and mountkernfs if startedinsserv: loop involving service mountkernfs at depth 1insserv: Starting vpnagentd_init depends on plymouth and therefore on system facility `$all' which can not be true!......
insserv: Starting vpnagentd_init depends on plymouth and therefore on system facility `$all' which can not be true!insserv: There is a loop between service vpnagentd_init and dns-clean if startedinsserv: loop involving service dns-clean at depth 1......
insserv: Starting vpnagentd_init 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 headerdpkg: error processing package binfmt-support (--configure):subprocess installed post-installation script returned error exit status 1No apport report written because MaxReports is reached alreadyProcessing triggers for initramfs-tools (0.122ubuntu8.10) ...update-initramfs: Generating /boot/initrd.img-4.13.0-32-genericErrors were encountered while processing:udevgrub-commongrub2-commongrub-pc-bingrub-pcresolvconfbinfmt-supportE: Sub-process /usr/bin/dpkg returned an error code (1)
这里只列出了部分错误信息,实际上输出的内容极多,多得让人眼都瞎。
原因我不知道,但经过一番Google,我找到了一个解决办法:
cd /var/lib/dpkg/info/
然后:
sudo mv udev.postinst udev.postinst.bak sudo mv grub-common.postinst grub-common.postinst.bak ...
文章来源:https://www.codelast.com/
其中,命令里的 udev,grub-common 之类的软件包名,就是前面的错误信息里列出来的所有软件包名,当你把所有的那些文件全部重命名之后,再重新执行任何安装软件的命令 sudo apt-get install xxx,就会发现一切正常了。
文章来源:https://www.codelast.com/
➤➤ 版权声明 ➤➤
转载需注明出处:codelast.com
感谢关注我的微信公众号(微信扫一扫):
谢谢分享,好方法!
Thank you.
相当有用的方法,终于解决了
感谢你, 感谢谷歌, 唯一有效的方法, 帮我解决了问题 ^_^.