Solved: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it

When running:

$ sudo apt-get upgrade

on my Raspberry Pi Virtual Machine, there was an issue:

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? 
$ sudo rm /var/lib/dpkg/lock
$ sudo dpkg --configure -a

Reference:

  1. https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process#answer-99538