In this tutorial I will show you the Quick and Dirty Way for fixing the /var/lib/dpkg/lock error.
When you press Ctrl – C to interrupt a process in the middle of the an apt-get task, you often get this error, and you cannot use apt-get anymore, because the system thinks that another process is using apt-get and it locks it:
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?
The quick and dirty solution for fixing the problem is to delete the /var/lib/dpkg/lock file, like this:
$ sudo rm -rf /var/lib/dpkg/lock