docker-install icon indicating copy to clipboard operation
docker-install copied to clipboard

Wait for dpgk lock to be released

Open AndreiBarbuOz opened this issue 1 year ago • 0 comments

We get frequent errors when running the installation script in the context of build agents hosted on Azure DevOps

E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 5322 (apt)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
##[error]Bash exited with code '100'.
##[warning]RetryHelper encountered task failure, will retry (attempt #: 1 out of 3) after 1000 ms

apt-get supports adding a new parameter to wait for the lock to be released

apt-get update -o DPkg::Lock::Timeout=600 -qq

which would reduce the number of failures

AndreiBarbuOz avatar May 24 '24 02:05 AndreiBarbuOz