0

I ran

    apt-get update
    apt-get upgrade

and everything was going fine until this happened:

Preparing to unpack .../mysql-server-5.5_5.5.50-0ubuntu0.14.04.1_amd64.deb ...
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm line 33.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm line 48.
open2: fork failed: Cannot allocate memory at /usr/share/perl5/Debconf/ConfModule.pm line 59.
dpkg: warning: subprocess old pre-removal script returned error exit status 12
dpkg: trying script from the new package instead ...
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm line 33.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm line 48.
open2: fork failed: Cannot allocate memory at /usr/share/perl5/Debconf/ConfModule.pm line 59.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.50-0ubuntu0.14.04.1_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 12
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm line 33.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm line 48.
open2: fork failed: Cannot allocate memory at /usr/share/perl5/Debconf/ConfModule.pm line 59.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 12
Preparing to unpack .../mysql-client-core-5.5_5.5.50-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-client-core-5.5 (5.5.50-0ubuntu0.14.04.1) over (5.5.49-0ubuntu0.14.04.1) ...
Preparing to unpack .../mysql-client-5.5_5.5.50-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-client-5.5 (5.5.50-0ubuntu0.14.04.1) over (5.5.49-0ubuntu0.14.04.1) ...
dpkg: unrecoverable fatal error, aborting:
 fork failed: Cannot allocate memory
E: Sub-process /usr/bin/dpkg returned an error code (2)

So I run:

    # free -m
             total       used       free     shared    buffers     cached
Mem:           992        693        298         16         16        144
-/+ buffers/cache:        532        459
Swap:            0          0          0

To me that looks like enough memory to run an update. Next I try:

# dpkg --configure -a
Setting up mysql-client-core-5.5 (5.5.50-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libcurl3-gnutls:amd64 (7.35.0-1ubuntu2.8) ...
Setting up libdrm2:amd64 (2.4.67-1ubuntu0.14.04.1) ...
Setting up libdrm-radeon1:amd64 (2.4.67-1ubuntu0.14.04.1) ...
Setting up libdrm-nouveau2:amd64 (2.4.67-1ubuntu0.14.04.1) ...
Setting up libcurl3:amd64 (7.35.0-1ubuntu2.8) ...
Setting up libmysqlclient18:amd64 (5.5.50-0ubuntu0.14.04.1) ...
Setting up libavahi-common-data:amd64 (0.6.31-4ubuntu1.1) ...
Setting up libavahi-common3:amd64 (0.6.31-4ubuntu1.1) ...
Setting up libdrm-intel1:amd64 (2.4.67-1ubuntu0.14.04.1) ...
Setting up libavahi-client3:amd64 (0.6.31-4ubuntu1.1) ...
Setting up mysql-client-5.5 (5.5.50-0ubuntu0.14.04.1) ...
Setting up curl (7.35.0-1ubuntu2.8) ...
dpkg: error processing package mysql-server-5.5 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
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
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

At this point, I am not sure what the problem is that I need to be trying to fix. I would really appreciate it if someone could point me in the right direction.

Thanks!

1 Answers1

0

For added visibility, here is what fixed it for me:

apt-get -f install

Thanks, @Kuntal Majumder