Ubuntu:dpkg更新管理器出错及解决

【问题描述】
cvsd 已经是最新的版本了。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 5 个软件包没有被完全安装或卸载。
解压缩后会消耗掉 0B 的额外空间。
正在设置 mysql-server-5.1 (5.1.41-3ubuntu12.3) ...

停止在这里不动
ps -aux 找到 sudo apt-get install 命令并kill这个pid后出现:
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 5 个软件包没有被完全安装或卸载。
解压缩后会消耗掉 0B 的额外空间。
debconf: DbDriver "config": /var/cache/debconf/config.dat islocked by another process: 资源暂时不可用
正在设置 mysql-server-5.1 (5.1.41-3ubuntu12.3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat islocked by another process: 资源暂时不可用
dpkg:处理 mysql-server-5.1 (--configure)时出错:
  子进程 已安装的 post-installation 脚本 返回了错误号 1
正在设置 man-db (2.5.7-2) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat islocked by another process: 资源暂时不可用
dpkg:处理 man-db (--configure)时出错:
  子进程 已安装的 post-installation 脚本 返回了错误号 1
正在设置 cvsd (1.0.18) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat islocked by another process: 资源暂时不可用
dpkg:处理 cvsd (--configure)时出错:
  子进程 已安装的 post-installation 脚本 返回了错误号 1
正在设置 flashplugin-installer (10.1.82.76ubuntu0.10.04.2)...
debconf: DbDriver "config": /var/cache/debconf/config.dat islocked by another process: 资源暂时不可用
dpkg:处理 flashplugin-installer (--configure)时出错:
  子进程 已安装的 post-installation 脚本 返回了错误号 1
没有写入 apport 报告,因为已经达到最大报告数
                                              正在设置 libpam-gnome-keyring(2.92.92.is.2.30.3-0ubuntu1.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat islocked by another process: 资源暂时不可用
dpkg:处理 libpam-gnome-keyring (--configure)时出错:
  子进程 已安装的 post-installation 脚本 返回了错误号 1
没有写入 apport 报告,因为已经达到最大报告数
                                              在处理时有错误发生:
  mysql-server-5.1
  man-db
  cvsd
  flashplugin-installer
  libpam-gnome-keyring
E: Sub-process /usr/bin/dpkg returned an error code (1)

【处理方法】

1、找到config.dat的占用进程并kill之
使用命令sudo lsof 或者 sudo fuser
root@crazoy-laptop:/home/crazoy# sudo lsof/var/cache/debconf/config.dat
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system/home/crazoy/.gvfs
        Output information may be incomplete.
COMMAND   PID USER   FD  TYPE DEVICE SIZE/OFF NODE NAME
frontend 8879 root     4rW  REG     8,6    39392 2273/var/cache/debconf/config.dat
root@crazoy-laptop:/home/crazoy# sudo fuser/var/cache/debconf/config.dat
/var/cache/debconf/config.dat:   8879

root@crazoy-laptop:/home/crazoy# ps -aux | grep 8879
Warning: bad ps syntax, perhaps a bogus '-'? Seehttp://procps.sf.net/faq.html
root       8879   0.0   0.3  11096   7748 ?           09:37   0:00/usr/bin/perl -w /usr/share/debconf/frontend/var/lib/dpkg/info/mysql-server-5.1.postinst configure5.1.41-3ubuntu12.3
root       9758   0.0   0.0  3544   824 pts/2    S+   14:01  0:00 grep 8879
root@crazoy-laptop:/home/crazoy# kill 8879


2、使用下列命令清理更新管理器

sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

【reference】

1. http://zhidao.baidu.com/question/157478444.html

2. http://apps.hi.baidu.com/share/detail/15621790
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值