I also get similar error when running sudo reconfigure postfix, which I relly need to run since outgoing e-mail is not working any more. I have also run sudo apt-get autoclean, sudo apt-getclean, sudo apt-get install debconf --reinstall and sudo apt-get install -f without success.

magento@ubuntu:~$ sudo apt-get install debconf --reinstall
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.5.0-17 linux-headers-3.5.0-17-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
mysql-server-5.5
Suggested packages:
tinyca mailx
The following packages will be upgraded:
mysql-server-5.5
1 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded.
28 not fully installed or removed.
Need to get 149 kB/8,990 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://no.archive.ubuntu.com/ubuntu/ quantal/main debconf all 1.5.46ubuntu1 [149 kB]
Fetched 149 kB in 0s (472 kB/s)
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
(Reading database ... 81482 files and directories currently installed.)
Preparing to replace mysql-server-5.5 5.5.28-0ubuntu0.12.10.1 (using .../mysql- server-5.5_5.5.28-0ubuntu0.12.10.2_amd64.deb) ...
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.28- 0ubuntu0.12.10.2_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.5_5.5.28-0ubuntu0.12.10.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.5
Suggested packages:
tinyca mailx
The following packages will be REMOVED:
linux-headers-3.5.0-17 linux-headers-3.5.0-17-generic
The following packages will be upgraded:
mysql-server-5.5
1 upgraded, 0 newly installed, 2 to remove and 8 not upgraded.
28 not fully installed or removed.
Need to get 0 B/8,840 kB of archives.
After this operation, 69.9 MB disk space will be freed.
Do you want to continue [Y/n]? y
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
(Reading database ... 81482 files and directories currently installed.)
Preparing to replace mysql-server-5.5 5.5.28-0ubuntu0.12.10.1 (using .../mysql- server-5.5_5.5.28-0ubuntu0.12.10.2_amd64.deb) ...
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.28- 0ubuntu0.12.10.2_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/perl5/Debconf/DbDriver/File.pm line 46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at /usr/share/perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at /usr/share/perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.5_5.5.28-0ubuntu0.12.10.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Thank you @EliahKagan. Running the first command goes fine, however, the second command gives the error below (similar to the initial error message). Thanks again for any suggestions.
–
audunmsJan 20 '13 at 9:35

And thank you @user123418, I am not sure who answered this question of you two.
–
audunmsJan 20 '13 at 9:35

@audunms user123418 wrote this answer; I just edited it in a relatively minor way. (See it's history.)
–
Eliah KaganJan 20 '13 at 10:02

Thank you @EliahKagan, original post now updated with more info.
–
audunmsJan 20 '13 at 13:47

And I'll be happy if you have some input to the actual question also @EliahKagan :-)
–
audunmsJan 20 '13 at 20:18

I've had this problem (Ubuntu 13.04), it was because I delted (accidently) /var/cache/debconf
I just recreated it and all was peachy again... so:
/var/cache/debconf:
missing = bad
present = good

PS: cut and paste if you are lazy like me:

sudo mkdir /var/cache/debconf

and I've found that some tools that claim to clean up hard drives go around deleting empty folders in places like /var/cache so...

sudo touch /var/cache/debconf/.dont-delete-this-directory

which of course then rmdir will be blocked when someone/something comes in and tries to get rid of it... of course the seasoned user knows to NEVER use optimization tools, especially on -nix based systems, that kind of crap is best left to the -dows crowd and their newbies, so most people reading this will probably be laughing at the thought of doing so... myself included (just bored i guess). Hope this helps.