Yesterday, our CircleCI builds suddenly started failing for the stage where we run sudo apt-get install -y...
#!/bin/bash -eo pipefail
sudo apt-get install -y attr
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package attr is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'attr' has no installation candidate
Exited with code 100
We have multiple jobs and all of them run a command step that installs one dependency on the ubuntu-1604:201903-01 machine we’ve specified.
commands:
setup:
steps:
- run: sudo apt-get install -y attr
- checkout
- run: pyenv global 3.6.5
- run: pip install --upgrade pip
I tried running apt-get update but I get another error instead:
#!/bin/bash -eo pipefail
sudo apt-get update && sudo apt-get install -y attr
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
Exited with code 100
This error doesn’t happen consistently. Some of our jobs using this step go on fine and some of them fail for this error. This leads me to believe that the VM is being shared among the jobs and they’re not each a dedicated VM.
Here is a link to our config.yaml file: https://github.com/vmware/tern/blob/master/.circleci/config.yml
Help appreciated. Thanks!