0

apt-get got stuck while installing mysql-server. I don't know why but it just stopped working and never continued. I had to reboot the machine in the middle of the setup process.

Now, if I try to install or purge the mysql-server package, apt-get tries to configure mysql-server first (tells me its not installed before that) and cancels with a error message:

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

apt-get also tells me that two packages have not been successfully installed or removed.

this is the complete console output:

christian@devbox:~$ sudo apt-get install mysql-server
[sudo] password for christian: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.
2 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
Setting up mysql-server-5.5 (5.5.32-0ubuntu7) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
christian@devbox:~$ 
  • This sounds like a bug in the MySQL package... – Thomas Ward Oct 21 '13 at 20:53
  • I don't think so. I tried to change the servers datadir location - and un- and re-installed mysql-server a few times, since it just didn't work. At some point, like after the 10th time, the installer just froze and never woke up again... – Christian Engel Oct 21 '13 at 21:11
  • Updated the post with a english log – Christian Engel Oct 21 '13 at 21:17
  • Still looks a little like a bug. I'd suggest you force-remove mysql-server-5.5 and mysql-server and then install the packages again. sudo dpkg --remove mysql-server-5.5 mysql-server; sudo apt-get install mysql-server-5.5 mysql-server Maybe this will fix the issue. The initscript couldn't start the mysql process which was the problem, hence it all failing, and that definitely looks a tad like a bug. – Thomas Ward Oct 21 '13 at 21:29

1 Answers1

0

I don't know why the actual package would be faulty so I would recommend forcing the install through dpkg.

sudo dpkg -i --force-all package.deb

you can find the actual package in /var/cache/apt/archives/

labarna
  • 2,614
  • 2
  • 22
  • 32