现在的位置: 首页 > 综合 > 正文

[转载]dpkg更行管理器出错及解决

2013年08月01日 ⁄ 综合 ⁄ 共 2555字 ⁄ 字号 评论关闭

【问题描述】

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 is locked by another process: 资源暂时不可用
正在设置 mysql-server-5.1 (5.1.41-3ubuntu12.3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked 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 is locked by another process: 资源暂时不可用
dpkg:处理 man-db (--configure)时出错:
 子进程 已安装的 post-installation 脚本 返回了错误号 1
正在设置 cvsd (1.0.18) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked 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 is locked 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 is locked 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 '-'? See http://procps.sf.net/faq.html
root      8879  0.0  0.3  11096  7748 ?        S    09:37   0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/mysql-server-5.1.postinst configure 5.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

抱歉!评论已关闭.