dpkg错误: subprocess installed post-removal script returned error exit status 2

想要卸载 nvidia-installer-cleanup的时候,出现了这个错误

dpkg: error processing glx-diversions (--remove):
subprocess installed post-removal script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
glx-diversions
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:

可以这样解决:

mv /var/lib/dpkg/info /var/lib/dpkg/info.110821 && mkdir /var/lib/dpkg/info && aptitude install -f

一路Yes,直到结束,再次运行dpkg或者aptitude就不会有异常了

Chinese, Simplified(简体中文)

评论

thx

Welcome :)

重建 info 目录不会出什么状况吧,那里面可是有 list, conffiles 等呢,

好问题! 确实可能会有,我遇到过一些警告. 类似于:

dpkg: warning: files list file for package `xxxx' missing, assuming package has no files currently installed.

据说彻底卸载或者重新安装相应的"xxxx"软件包,可以解决问题,但是我没有验证.
所以上面博客介绍的方法需要,进一步验证才好,小心使用!

添加新评论