I have a script that has been working well until now and suddenly I get the following message:
Get:81 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-software-properties all 0.96.20.7 [20.7 kB]
Get:82 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3-pycurl amd64 7.43.0-1ubuntu1 [42.3 kB]
Get:83 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3-software-properties all 0.96.20.7 [20.3 kB]
Get:84 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 software-properties-common all 0.96.20.7 [9452 B]
Get:85 http://archive.ubuntu.com/ubuntu xenial/main amd64 xz-utils amd64 5.1.1alpha+20120614-2ubuntu2 [78.8 kB]
Err:86 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 unattended-upgrades all 0.90ubuntu0.7
404 Not Found [IP: 91.189.88.161 80]
Fetched 23.7 MB in 1s (14.8 MB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python3.5/libpython3.5-minimal_3.5.2-2ubuntu0~16.04.2_amd64.deb 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python3.5/python3.5-minimal_3.5.2-2ubuntu0~16.04.2_amd64.deb 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python3.5/libpython3.5-stdlib_3.5.2-2ubuntu0~16.04.2_amd64.deb 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python3.5/python3.5_3.5.2-2ubuntu0~16.04.2_amd64.deb 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libi/libidn/libidn11_1.32-3ubuntu1.1_amd64.deb 404 Not Found [IP: 91.189.88.161 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/u/unattended-upgrades/unattended-upgrades_0.90ubuntu0.7_all.deb 404 Not Found [IP: 91.189.88.161 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get -y install software-properties-common python-software-properties' returned a non-zero code: 100
It seems that when running:
apt-get -y install software-properties-common python-software-properties
Some server is down. How can I avoid having this dependency? This is part of a continuous integration server and I would like to avoid these problems in the future.
NOTE: I ran sudo apt update
before.. This is in fact, part of a Dockerfile:
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install software-properties-common python-software-properties
RUN apt-get -y install ca-certificates curl
RUN apt-get -y install build-essential git sudo
building the container fails in the second line.
According to docker best practices, I should put the update and install in the same RUN line. This way the cache will be updated properly.
After these changes, things are working.
If you're running into this issue while using Docker, you may need to run the docker build command with the
--no-cache
option to get it to start again from the beginning.The files have been removed from the server for some reason.
Open up a new browser window and copy/paste the following in the URL address bar and hit Enter and see for yourself:
You can also try:
and you will get the same error.
Can you please post the contents of
/etc/apt/sources.list
?You just need to edit the URLs in the file to redirect APT to different servers and run
sudo apt update
and try again.Look what happens when I visit one of the URLs from my end:
This is why it fails. You need to change the server reference.