Failed to fetch dependencies when running automation script

My build started to fail
> Err:16 texttu xenial-updates/universe i386 awscli all 1.11.13-1~16.04.0

  404  Not Found [IP: 80]
Fetched 3,044 kB in 1s (2,530 kB/s)
E: Failed to fetch  404  Not Found [IP: 80]

while I’m running

sudo apt-get install -y awscli


Thanks for reporting the issue here! :wink:

This is because the apt-get package you can see in the log was removed. When you do an apt-get install it selects the install from the local specs/version cache.

So, the solution is to update this local specs/version cache, and apt-get install after that.

It’s as simple as:

sudo apt-get update

If you do manual apt-get install calls (e.g. in a Script step) you can also chain the two:

sudo apt-get update && sudo apt-get install -y awscli

If you use a step which declared an apt-get package as dependency, and the CLI fails because it does not run apt-get update: we’ll fix this soon, in an upcoming Bitrise CLI version, for now just drop in a Script step as the first step in the workflow and run sudo apt-get update with it.