Error processing libc6:i386 and libtinfo5:i386 while trying to install anything "/var/cache/debconf/config.dat is locked..." [duplicate]

When I try to install anything through apt-get or synaptic I keep on getting this output

...
Fetched 23.6 MB in 1min 10s (336 kB/s)                                         
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up libc6:i386 (2.15-0ubuntu10.3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing libc6:i386 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libtinfo5:i386:
 libtinfo5:i386 depends on libc6 (>= 2.4); however:
  Package libc6:i386 is not configured yet.
dpkg: error processing libtinfo5:i386 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libc6:i386
 libtinfo5:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)

What could be the problem, and how can I fix it?


This is what worked for me on Ubuntu 15.10 on a DELL XPS Developer edition laptop :

sudo apt-get install --reinstall libc6-i386

Removing files from /var/cache/debconf did not really work for me. I kept getting the error every time i ran an upgrade.


Working answer in the question comment ...thank you Achu and Ican


sudo rm /var/cache/debconf/*   #no wories it's just a cache folder 
sudo apt-get update