Play around with Ubuntu (Could not get lock / var / lib / dpkg / lock appears in Ubuntu)

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
Insert picture description here

Published 315 original articles · praised 937 · 650,000 views

Guess you like

Origin blog.csdn.net/super828/article/details/99066700