我在 ubuntu 上安装 mysql-server-5.1,安装中断了。这导致错误,现在我无法删除该软件包或重新安装它。
这是控制台输出:
amatteo@ubuntu:~$ sudo apt-get install mysql-server-5.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server-5.1 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up mysql-server-5.1 (5.1.49-1ubuntu8.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing mysql-server-5.1 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up man-db (2.5.9-4) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing man-db (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up wamerican (6-3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing wamerican (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up wbritish (6-3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing wbritish (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of language-support-writing-en:
language-support-writing-en depends on wamerican; however:
Package wamerican is not configured yet.
language-support-writing-en depends on wbritish; however:
Package wbritish is not configured yet.
dpkg: error processing language-support-writing-en (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up wspanish (1.0.25) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing wspanish (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of language-support-writing-es:
language-support-writing-es depends on wspanish; however:
Package wspanish is not configured yet.
dpkg: error processing language-support-writing-es (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
mysql-server-5.1
man-db
wamerican
wbritish
language-support-writing-en
wspanish
language-support-writing-es
E: Sub-process /usr/bin/dpkg returned an error code (1)
起初它只是 mysql-server-5.1,但是现在它显示从那时起我安装的每个包上都有错误。
有任何想法吗?
提前感谢您。
答案1
在执行任何其他操作之前,您需要找到并终止锁定 /var/cache/debconf/config.dat 的进程。
您可以使用
lsof /var/cache/debconf/config.dat
或者
fuser -v /var/cache/debconf/config.dat
找出哪个进程正在锁定此文件并kill
终止该进程。
一旦你这样做了,你应该能够使用 apt-get 来安装 mysql-server,虽然我会使用 Synaptic 来查看包的当前状态,过滤器上被称为“Broken”,这将允许您先整理一下。