您的位置:首页 > 其它

apt-get autoremove不能删除包的解决方法

2009-03-20 00:55 453 查看
进入死循环,dpkg系统不能升级或者安装了。

$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
jython-gcj libreadline-java bicyclerepair jython exuberant-ctags
libcommons-codec-java
The following packages will be REMOVED
bicyclerepair exuberant-ctags jython jython-gcj libcommons-codec-java
libreadline-java
0 upgraded, 0 newly installed, 6 to remove and 12 not upgraded.
1 not fully installed or removed.
After this operation, 17.5MB disk space will be freed.
Do you want to continue [Y/n]? Y
Setting up dash (0.5.4-9ubuntu1.1) ...
/usr/sbin/dpkg-divert: 1: Syntax error: word unexpected (expecting ")")
dpkg: error processing dash (--configure):
subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
dash
E: Sub-process /usr/bin/dpkg returned an error code (1)

找到了解决办法。便是在/var/lib/dpkg/info/中找到损坏的包,并且删除之。

/var/lib/dpkg/info$ ls |grep dash
dash.config
dash.list
dash.md5sums
dash.postinst
dash.postrm
dash.prerm
dash.templates

然后sudo rm dash*
重新sudo apt-get install dash
再次sudo apt-get autoremove
并且sudo apt-get upgrade
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: