dpkg:error handlinglinux-headers-3.2.0-35

每当我在终端中安装,更新或卸载程序时,都会出现这种情况

sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED linux-headers-3.2.0-35-generic-pae 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 11.3 MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 251024 files and directories currently installed.) Removing linux-headers-3.2.0-35-generic-pae ... dpkg: error processing linux-headers-3.2.0-35-generic-pae (--remove): unable to securely remove ': File name too long Errors were encountered while processing: linux-headers-3.2.0-35-generic-pae E: Sub-process /usr/bin/dpkg returned an error code (1) 

我也试过清除dpkg,但终端的错误相同。 能力也行不通! 任何解决方案来修复它?

http://www.iasptk.com/ubuntu-fix-broken-package-best-solution

尝试后

 sudo dpkg --configure -a 

 sudo apt-get install -f 

破解包的问题仍然存在,解决方案是手动编辑dpkg状态文件。

 $ sudo gedit /var/lib/dpkg/status (you can use vi or nano instead of gedit) 

找到损坏的包,并删除有关它的整个信息块并保存文件。

Ubuntu软件更新程序完成了这项工作。 部分升级选项可用,通用列表自动更新。