Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I tried to install the mysql-server package on my Ubuntu VPS. The apt-get process crashed and I had to kill it. Now I have this error message whenever I try to install it again:

$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  mysql-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/6,452 B of archives.
After this operation, 98.3 kB of additional disk space will be used.
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Selecting previously deselected package mysql-server.
(Reading database ... 36812 files and directories currently installed.)
Unpacking mysql-server (from .../mysql-server_5.1.61-0ubuntu0.11.10.1_all.deb) ...
Setting up mysql-server-5.1 (5.1.61-0ubuntu0.11.10.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.6.0.2-2) ...
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 libapache2-mod-php5 (5.3.6-13ubuntu3.6) ...
    debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up php5-cli (5.3.6-13ubuntu3.6) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing php5-cli (--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 mysql-server:
 mysql-server depends on mysql-server-5.1; however:
  Package mysql-server-5.1 is not configured yet.
dpkg: error processing mysql-server (--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
 libapache2-mod-php5
 php5-cli
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please help, it's kind of urgend.

share|improve this question
    
first you have to uninstall the mysql server from mysql removal tool on ubuntu and then again install it in your system. you can find the mysql removal tool from net –  Ghost Answer Apr 17 '12 at 10:06
    
Can you point me to it, I seem to be too incompetent to find it. –  Lambda Dusk Apr 17 '12 at 10:14
    
Because you are installing from net, than may your net be disconnected or the mysql package be corrupted and happen more thing to break this. I hope this link help you ubuntuforums.org/showthread.php?t=1407998 –  Ghost Answer Apr 17 '12 at 10:21
    
if the package was corrupted, dpkg wouldn't be trying to install it, since the md5sum would not match what is in the Packages file. –  stew Apr 17 '12 at 11:38
    
@GhostAnswer your second comment helped me a bit. Mysql won't start anyway, so I have to find some other way. –  Lambda Dusk Apr 17 '12 at 15:02

1 Answer 1

run fuser /var/cache/debconf/config.dat to find the process which locked that file. (you might have to install the psmisc package to get fuser). I'd try to kill that process (but gracefully, not with -9)

share|improve this answer
    
The file seems not to be use outside of the process. fuser does not tell me anything. Only when I start the apt-get, I get the error that it's locked. –  Lambda Dusk Apr 17 '12 at 14:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.