我一直未能在Ubuntu中安装新的软件包,因为linux限制的-模块-2.6.28-17-通用包是坏的…
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/模块/2.6.28-17-泛型/易失性/‘:没有这样的文件或目录致命:无法打开’/boot/System.map-2.6.28-17-泛型‘:没有这样的文件或目录更新-initramfs:生成/boot/initrd.img-2.6.28-17-泛型找不到/lib/模块/2.6.28-17-泛型更新-initramfs: failed /boot/initrd.img-2.6.28-17-泛型dpkg:错误处理linux-受限-模块-2.6.28-17-泛型(--删除):子进程安装后删除脚本返回错误退出状态1错误,而处理:linux-限制-模块-2.6.28-17-泛型
非常感谢,阿维纳什。
发布于 2010-07-31 17:29:57
当包的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以完成任何包管理操作(安装、配置、删除、…)那是在等待移除。
https://serverfault.com/questions/165890
复制相似问题