dpkg locked by another process code example
Example: dpkg: error: dpkg frontend lock was locked by another process with pid 4368
sudo rm /var/lib/dpkg/lock-frontend
sudo dpkg --configure -a
sudo rm /var/lib/dpkg/lock-frontend
sudo dpkg --configure -a