I was receiving this error in 10.04, and it was due to a deleted lock file.
Same as thread:
http://ubuntuforums.org/archive/index.php/t-25443.html
/var/cache/debconf/config.dat is locked by another proces
I fixed it by recreating the dpkg lock file:
Code:
sudo touch /var/lib/dpkg/lock
If its already there:
Code:
sudo rm /var/lib/dpkg/lock
Code:
sudo touch /var/lib/dpkg/lock
I had deleted the lock file after a failed apt-get process. I hope this helps others.
I then cleaned the package manager with:
Code:
sudo dpkg --configure -a
-Tres