我一直无法在Ubuntu中安装新的软件包,因为linux-restricted-modules-2.6.28-17-generic软件包被破坏…
I get the following errors while installing any package....I had once been stupid enough to delete the /lib/modules/2.6.28-17 directory while removing the 2.6.28-17 kernel files, Instead of uninstalling it. Is there any way to rectify (work around) this problem...How would it be if I simply try to recreate the file structure in /var/lib/dpkg/info/linux-restricted-modules-2.6.28-17-generic.postrm, Just a suggestion, would it work??? Please help me out!!!
Removing linux-restricted-modules-2.6.28-17-generic ...
rmdir:无法移除`/lib/modules/2.6.28-17-generic/volatile/':没有这样的文件或目录FATAL:无法打开'/boot/System.map-2.6.28-17-generic':没有这样的文件或目录update-initramfs:生成/boot/initrd.img-2.6.28-17-generic找不到/lib/modules/2.6.28-17-generic update-initramfs:/boot/initrd.img失败-2.6.28-17-generic dpkg:处理linux-restricted-modules-2.6.28-17-generic(–remove)时出错:安装了subprocess后删除脚本返回错误退出状态1处理中遇到错误:linux-限制模块-2.6.28-17generics
非常感谢,Avinash。
当一个包的prerm或postrm脚本失败时,通常最好的办法是编辑/var/lib/dpkg/info的脚本,并注释掉(或者有时调整)失败的行。 你应该仔细检查这些行正在做什么,并尝试手动做他们试图做的。
在你的情况下,你已经删除了脚本试图删除的文件,所以注释掉/var/lib/dpkg/info/linux-restricted-modules-2.6.28-17-generic.postrm的失败行并运行dpkg --remove linux-restricted-modules-2.6.28-17-generic 。
一旦删除了违规包,运行apt-get -f install来完成正在等待删除的任何包pipe理操作(安装,configuration,删除等)。