dpkg: error: dpkg frontend is locked by another process

Question

Today, the following problems occur when using dpkg – I *. DEB:

root@zabbix-server:~# dpkg -i zabbix-release_4.0-3+bionic_all.deb
dpkg: error: dpkg frontend is locked by another process

reason

This is because the package manager did not close properly

solve

1. Find out the process of saving the lock file

lsof /var/lib/dpkg/lock-frontend
sudo kill -9 PID

2. Remove the lock and reconfigure the dpkg

sudo rm /var/lib/dpkg/lock-frontend
sudo dpkg --configure -a

3. Then don’t report mistakes

Read More: