Use sudo apt-get update command to report an error: E: Unable to obtain lock / var / lib / apt / lists / lock -open (11: resources are temporarily unavailable)

Premise: First update the resources when installing Docker in Ubuntu. After using the sudo apt-get update command, an error is reported:

E: Unable to obtain lock / var / lib / apt / lists / lock -open (11: resource temporarily unavailable)

E: Unable to lock the directory / var / lib / apt / lists /

Solution: Force unlock

input the command:

sudo rm /var/cache/apt/archives/lock

sudo rm /var/lib/dpkg/lock

Re-enter after

sudo apt-get update

Published 26 original articles · praised 6 · visits 1395

Guess you like

Origin blog.csdn.net/Sabrina_cc/article/details/103137072