首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu9.10:由于软件包损坏而无法安装软件包

问Ubuntu9.10:由于软件包损坏而无法安装软件包
EN

Server Fault用户
提问于 2010-07-31 16:05:11
回答 1查看 450关注 0票数 1

我一直未能在Ubuntu中安装新的软件包,因为linux限制的-模块-2.6.28-17-通用包是坏的…

代码语言:javascript
复制
   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!!!
代码语言:javascript
复制
   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-泛型

E:子进程/usr/bin/dpkg返回一个错误代码(1)

非常感谢,阿维纳什。

EN

回答 1

Server Fault用户

回答已采纳

发布于 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以完成任何包管理操作(安装、配置、删除、…)那是在等待移除。

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/165890

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档