dpkg hang Setting up mysql-server-5.5 (5.5.49-0ubuntu0.14.04.1)

Asked by Ken LaBar

Hello,

My system hangs after the most recent apt-get update.
I've been unsuccessful in getting any solutions to work (many similar issues, but none where mysql hangs.)
Now other updates are blocked, so I'm not sure how to proceed.

Here is the basic issue (ran for 3 days, using 100% of a single core)

<pre>
~$ sudo dpkg --configure -a
Setting up mysql-server-5.5 (5.5.49-0ubuntu0.14.04.1) ...
mysql stop/waiting
</pre>

I ran through the dpkg troubleshooting page as far as possible (until the hang)
https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

Here is that output:
> ken@ken-Studio-540:~$ sudo apt-get install -f
> [sudo] password for ken:
> E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
> ken@ken-Studio-540:~$ ubuntu-support-status
> Support status summary of 'ken-Studio-540':
>! << hover for more >>
>! You have 199 packages (5.5%) supported until February 2015 (9m)
>! You have 160 packages (4.4%) supported until May 2017 (3y)
>! You have 130 packages (3.6%) supported until February 2017 (9m)
>! You have 2744 packages (76.1%) supported until May 2019 (5y)
>!
>! You have 57 packages (1.6%) that can not/no-longer be downloaded
>! You have 317 packages (8.8%) that are unsupported
>!
>! Run with --show-unsupported, --show-supported or --show-all to see more details
>! ken@ken-Studio-540:~$ cat /etc/dpkg/dpkg.cfg.d/mulitarch
>! cat: /etc/dpkg/dpkg.cfg.d/mulitarch: No such file or directory
>! ken@ken-Studio-540:~$
>! ken@ken-Studio-540:~$ dpkg --print-foreign-architectures
>! i386
>! ken@ken-Studio-540:~$ sudo grep -R proxy /etc/apt/*
>! ken@ken-Studio-540:~$ grep proxy /etc/environment
>! ken@ken-Studio-540:~$ echo $http_proxy
>!
>! ken@ken-Studio-540:~$ echo $ftp_proxy
>!
>! ken@ken-Studio-540:~$ grep proxy /etc/bash.bashrc
>! ken@ken-Studio-540:~$ grep proxy ~/.bashrc
>! ken@ken-Studio-540:~$ cat /etc/apt/apt.conf
>! cat: /etc/apt/apt.conf: No such file or directory
>! ken@ken-Studio-540:~$ sudo fuser -vvv /var/lib/dpkg/lock
>! ken@ken-Studio-540:~$ sudo fuser -vvv /var/cache/apt/archives/lock
>! ken@ken-Studio-540:~$ cat /etc/lsb-release
>! DISTRIB_ID=Ubuntu
>! DISTRIB_RELEASE=14.04
>! DISTRIB_CODENAME=trusty
>! DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
>! ken@ken-Studio-540:~$ uname -a
>! Linux ken-Studio-540 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>! ken@ken-Studio-540:~$ sudo rm /var/lib/apt/lists/lock
>! ken@ken-Studio-540:~$ sudo rm /var/cache/apt/archives/lock
>! ken@ken-Studio-540:~$ sudo rm /var/lib/dpkg/lock
>! ken@ken-Studio-540:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
>! ken@ken-Studio-540:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
>! ken@ken-Studio-540:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
>! ken@ken-Studio-540:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
>! ken@ken-Studio-540:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
>! ken@ken-Studio-540:~$ sudo rm -rf /var/lib/dpkg/updates/*
>! ken@ken-Studio-540:~$ sudo rm -rf /var/lib/apt/lists
>! ken@ken-Studio-540:~$ sudo rm /var/cache/apt/*.bin
>! rm: cannot remove ‘/var/cache/apt/*.bin’: No such file or directory
>! ken@ken-Studio-540:~$ sudo mkdir /var/lib/apt/lists
>! ken@ken-Studio-540:~$ sudo mkdir /var/lib/apt/lists/partial
>! ken@ken-Studio-540:~$ LANG=C;sudo apt-get clean
>! ken@ken-Studio-540:~$ LANG=C;sudo apt-get autoclean
>! Reading package lists... Done
>! Building dependency tree
>! Reading state information... Done
>! ken@ken-Studio-540:~$ sudo dpkg --configure -a
>! Setting up mysql-server-5.5 (5.5.49-0ubuntu0.14.04.1) ...
>! mysql stop/waiting

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

Have you tried stopping MySQL, then running the upgrade?

Revision history for this message
Ken LaBar (ken-labar) said :
#2

Thank you! Stopping mySQL got passed the hang, however it looks like I still have work to do.
... seems obvious in hind-sight.

For others who may be in the same boat, here is what I did:
<code>
sql stop/waiting
^Z
[1]+ Stopped sudo dpkg --configure -a
ken@ken-Studio-540:~$ sudo service mysql stop
[sudo] password for ken:
mysql stop/waiting
ken@ken-Studio-540:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process
ken@ken-Studio-540:~$ sudo rm /var/lib/dpkg/lock
ken@ken-Studio-540:~$ sudo dpkg --configure -a
Setting up mysql-server-5.5 (5.5.49-0ubuntu0.14.04.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
Setting up php5-cli (5.5.9+dfsg-1ubuntu4.16) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package php5-cli (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.16) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.5.9+dfsg-1ubuntu4.16) | libapache2-mod-php5filter (>= 5.5.9+dfsg-1ubuntu4.16) | php5-cgi (>= 5.5.9+dfsg-1ubuntu4.16) | php5-fpm (>= 5.5.9+dfsg-1ubuntu4.16); however:
  Package libapache2-mod-php5 is not configured yet.
  Package libapache2-mod-php5filter is not installed.
  Package php5-cgi is not installed.
  Package php5-fpm is not installed.

dpkg: error processing package php5 (--configure):
 dependency problems - leaving unconfigured
Setting up apt-utils (1.0.1ubuntu2.13) ...
dpkg: dependency problems prevent configuration of php5-readline:
 php5-readline depends on php5-cli (= 5.5.9+dfsg-1ubuntu4.16); however:
  Package php5-cli is not configured yet.

dpkg: error processing package php5-readline (--configure):
 dependency problems - leaving unconfigured
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 package mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up php5-mysql (5.5.9+dfsg-1ubuntu4.16) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package php5-mysql (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mysql-server-5.5
 php5-cli
 libapache2-mod-php5
 php5
 php5-readline
 mysql-server
 php5-mysql
ken@ken-Studio-540:~$
</code>

Still have the following issues to work through, I'll post separately if needed.
Thank you!

P.S.: new to launchpad, I didn't find any hints on proper formatting of posts? tried <pre> and >! but they didn't do anything. Trying <code> here, fingers crossed!

Revision history for this message
Ken LaBar (ken-labar) said :
#3

Thanks actionparsnip, that solved my question.