This error happens because of the lock files present in the root directory. These files are generated automatically while you install a new tool or update the repository.
Fix the error by simply removing the lock files. Apply these commands in the terminal-
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
Managed & maintained by M Digital Media Group.Powered by Pulin Deori