Skip to content

Instantly share code, notes, and snippets.

@askb
Created October 31, 2017 22:40
Show Gist options
  • Save askb/8ebc682d0def8ff73649ce48c186aa94 to your computer and use it in GitHub Desktop.
Save askb/8ebc682d0def8ff73649ce48c186aa94 to your computer and use it in GitHub Desktop.
Workaroud for apt "Could not get lock /var/lib/dpkg/lock"
#
# 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
# Wait for any background apt processes to finish
# There seems to be a backgroud apt process that locks /var/lib/dpkg/lock
# and causes our apt commands to fail.
while pgrep apt > /dev/null; do sleep 1; done
@dzirg44
Copy link

dzirg44 commented Sep 17, 2022

Hi man, thank you for this timesaver )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment