I got the following error after aborting my installation on terminal by “accidentally pressing CTRL+C” with my lazy fingers.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Here’s the solution how to fix it , btw i’m using Ubuntu 11.04 here.
1. Check “another process using it”
ps aux | egrep -i 'apt|ftp|kpack|dpkg' | less
2. kill it
kill -9 ($pid of apt, ftp, kpack, dpkg)
3.Remove the locks
sudo rm /var/lib/dpkg/lock
sudo rm /var/cache/apt/archives/lock
4.Update the file database
5. Reconfig dpkg from broken installation.
sudo dpkg --configure -a