LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1388|回复: 0

E: Sub-process /usr/bin/dpkg returned an error code (1)

[复制链接]
发表于 2011-4-21 17:28:15 | 显示全部楼层 |阅读模式
在ubuntu更新的时候意外中断了,结果
  1. gleerat@gleerat-desktop:~$ sudo apt-get autoremove
  2. 正在读取软件包列表... 完成
  3. 正在分析软件包的依赖关系树      
  4. 正在读取状态信息... 完成      
  5. 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
  6. 有 2 个软件包没有被完全安装或卸载。
  7. 解压缩后会消耗掉 0 B 的额外空间。
  8. 正在设置 apport (1.20.1-0ubuntu4) ...
  9. start: Job failed to start
  10. invoke-rc.d: initscript apport, action "start" failed.
  11. dpkg:处理 apport (--configure)时出错:
  12. 子进程 已安装 post-installation 脚本 返回了错误号 1
  13. dpkg:依赖关系问题使得 apport-gtk 的配置工作不能继续:
  14. apport-gtk 依赖于 apport (>= 0.41);然而:
  15.   软件包 apport 尚未配置。
  16. dpkg:处理 apport-gtk (--configure)时出错:
  17. 依赖关系问题 - 仍未被配置
  18. 由于已经达到 MaxReports 限制,没有写入 apport 报告。
  19.                                                     由于已经达到 MaxReports 限制,没有写入 apport 报告。
  20.                         在处理时有错误发生:
  21. apport
  22. apport-gtk
  23. E: Sub-process /usr/bin/dpkg returned an error code (1)
复制代码
我见到有人这样解决的
  1. cd /var/lib/dpkg
  2. sudo mv info info.bak
  3. sudo mkdir info
复制代码
但是据说这种方法会造成升级尤其是内核升级时的麻烦。
http://ubuntuforums.org/showthread.php?t=1598999给出了一种解决方法,
Here is how I solved this problem.

1) Close any package manager, this includes Synaptic, Update Manager and Software Center.
2) Open terminal and execute the following commands (press Enter after every line to execute):
  1. sudo pkill apt
  2. sudo apt-get clean
  3. sudo pkill apt
复制代码
3) Start Update Manager and hit "Check".
3a) If you have any updates, install the updates.
4) Close Update Manager.

WARNING:  I received this problem when doing an update, even worse, when doing a  kernel update. This problem forced only some of the packages to install  so a reboot, as some suggest, would spell disaster in my case. Fix your  problem before rebooting!
依然如故。按照另一种方案:
  1. gleerat@gleerat-desktop:~$ sudo dpkg --configure --pending
  2. 正在设置 apport (1.20.1-0ubuntu4) ...
  3. start: Job failed to start
  4. invoke-rc.d: initscript apport, action "start" failed.
  5. dpkg:处理 apport (--configure)时出错:
  6. 子进程 已安装 post-installation 脚本 返回了错误号 1
  7. dpkg:依赖关系问题使得 apport-gtk 的配置工作不能继续:
  8. apport-gtk 依赖于 apport (>= 0.41);然而:
  9.   软件包 apport 尚未配置。
  10. dpkg:处理 apport-gtk (--configure)时出错:
  11. 依赖关系问题 - 仍未被配置
  12. 在处理时有错误发生:
  13. apport
  14. apport-gtk
  15. gleerat@gleerat-desktop:~$ sudo apt-get install -f
  16. 正在读取软件包列表... 完成
  17. 正在分析软件包的依赖关系树      
  18. 正在读取状态信息... 完成      
  19. 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
  20. 有 2 个软件包没有被完全安装或卸载。
  21. 解压缩后会消耗掉 0 B 的额外空间。
  22. 正在设置 apport (1.20.1-0ubuntu4) ...
  23. start: Job failed to start
  24. invoke-rc.d: initscript apport, action "start" failed.
  25. dpkg:处理 apport (--configure)时出错:
  26. 子进程 已安装 post-installation 脚本 返回了错误号 1
  27. dpkg:依赖关系问题使得 apport-gtk 的配置工作不能继续:
  28. apport-gtk 依赖于 apport (>= 0.41);然而:
  29.   软件包 apport 尚未配置。
  30. dpkg:处理 apport-gtk (--configure)时出错:
  31. 依赖关系问题 - 仍未被配置
  32. 由于已经达到 MaxReports 限制,没有写入 apport 报告。
  33.                                                     由于已经达到 MaxReports 限制,没有写入 apport 报告。
  34.                         在处理时有错误发生:
  35. apport
  36. apport-gtk
  37. E: Sub-process /usr/bin/dpkg returned an error code (1)
  38. gleerat@gleerat-desktop:~$ sudo dpkg --configure -a
  39. 正在设置 apport (1.20.1-0ubuntu4) ...
  40. start: Job failed to start
  41. invoke-rc.d: initscript apport, action "start" failed.
  42. dpkg:处理 apport (--configure)时出错:
  43. 子进程 已安装 post-installation 脚本 返回了错误号 1
  44. dpkg:依赖关系问题使得 apport-gtk 的配置工作不能继续:
  45. apport-gtk 依赖于 apport (>= 0.41);然而:
  46.   软件包 apport 尚未配置。
  47. dpkg:处理 apport-gtk (--configure)时出错:
  48. 依赖关系问题 - 仍未被配置
  49. 在处理时有错误发生:
  50. apport
  51. apport-gtk
  52. gleerat@gleerat-desktop:~$
复制代码
请问,有没有其他方法?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表