dpkg: 处理 linux-headers-3.2.0-35 时出错

dpkg: 处理 linux-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,但终端上出现了同样的错误。Aptitude 也不起作用!有什么解决办法吗?

答案1

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)

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

答案2

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

相关内容