I had trouble installing MySQL server on my laptop. And now if i try installing anything new it gives an error message. I tried most of the sites but could not find a solution to my problem.

When I run sudo apt-get install -f I get the following message:

 sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
Suggested packages:
  tinyca mailx
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 497 not upgraded.
1 not fully installed or removed.
Need to get 0 B/8,719 kB of archives.
After this operation, 31.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 152696 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.32-0ubuntu0.12.04.1_i386.deb) ...
groupadd: cannot lock /etc/group; try again later.
addgroup: `/usr/sbin/groupadd -g 139 mysql' returned error code 10. Exiting.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.32-0ubuntu0.12.04.1_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • Any help will be greatly appreciated. Sep 2, 2013 at 10:17
  • run the following commands sudo rm /var/cache/debconf/* && sudo apt-get update
    – Tarun
    Sep 2, 2013 at 10:23

1 Answer 1


Restart your system, if the problem persists then run, in a console:

sudo rm /etc/group.lock /etc/gshadow.lock

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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