Play around with Ubuntu (Could not get lock / var / lib / dpkg / lock appears in Ubuntu)
Author CodeAllen , please indicate the source
This error occurred while installing the source
Error type
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 reason is because apt is still running
The solution is to kill all apt processes
1. Find all apt processes
ps afx|grep apt
2. Turn off the running process (PID is the first parameter in the above figure)
sudo kill -9 PID
Need to provide root permissions