## Installing the NodeSource Node.js 10.x repo...
## Populating apt-get cache...
+ apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
Error executing command, exiting
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs : Depends: libv8-3.14.5 but it is not installable
E: Unable to correct problems, you have held broken packages.
/home/circleci/project/edcode/.circleci/setup_node.sh: 6: /home/circleci/project/edcode/.circleci/setup_node.sh: npm: not found
Exited with code 127
The killall -9 stops any rogue apt-get procs from continuing and unlocks the package list so you can install your dependencies. The || true is a failsafe in case there aren’t any procs.
Things that didn’t work for me:
switching to an older machine executor (I’m using circleci/classic:201808-01 )
adding a sleep
trying to install the packages before checking out my repo
No problem. I wouldn’t necessarily do that on my own machine as it could cause unexpected corruptions, but since Circle VMs are ethereal it’s a relatively safe experimentation.