Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I see Failed to fetch error while dping apt-get update

apt-get update in my jenkins job fails wth Http404 error on pulling docker hub related repositiories

12:38:54 + uname -a
12:38:54 Linux c612ce175fe3 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
12:28:18 W: Failed to fetch https://apt.dockerproject.org/repo/dists/ubuntu-trusty/main/binary-amd64/Packages  HttpError404
12:28:18 
12:28:18 W: Failed to fetch https://apt.dockerproject.org/repo/dists/ubuntu-trusty/main/binary-i386/Packages  HttpError404
12:28:18 
like image 508
ambikanair Avatar asked Apr 07 '20 07:04

ambikanair


People also ask

How do I fix failed to fetch?

To solve the "TypeError: Failed to fetch", make sure to pass the correct configuration to the fetch method, including the URL, HTTP method and headers, and verify that the server you're making a request to is setting the correct CORS headers with the response.

How do I fix apt update error?

1) In the first step open the Terminal & type, apt-get update and then press the enter button. Now make sure you got a similar error as shown in the picture below. 2) Now open the app drawer & search “Software & Update”, now open the app from the search result. 3) Now go to the Ubuntu Software section.

Why apt-get install not working?

After installing the APT package, check the /usr/bin/ directory to ensure if it had properly installed. If the file is empty, then run the locate apt-get command again. If no result is shown, there is no alternative but to reinstall the operating system. This might fix the problem.

How do I force upgrade apt-get?

Copy and paste sudo dpkg --configure -a into the Terminal. You can also try: sudo apt-get install -f to fix broken dependencies.


1 Answers

I have the same problem on several older Ubuntu test systems. Finally found this notice when searching the URL with the 404 error https://apt.dockerproject.org/

Notice: Shutting down dockerproject.org APT and YUM repos 2020-03-31

Docker will be shutting down the deprecated APT and YUM repositories hosted at "dockerproject.org" and "dockerproject.com" on the 31st of March 2020.

We noticed that this project is referencing one of these repositories, and recommend updating to use the "download.docker.com" repository to prevent disruption.

More info: https://www.docker.com/blog/changes-dockerproject-org-apt-yum-repositories/

My fix was to edit either /etc/apt/sources.list.d/docker.list or /etc/apt/sources.list and comment out the old line and add a new the new line. For my raspberry pi I used [arch=armhf] instead of [arch=amd64], hope this helps.

sudo vi /etc/apt/sources.list.d/docker.list

make this change

#       deb https://apt.dockerproject.org/repo ubuntu-trusty main
deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
like image 124
Bradley Allen Avatar answered Oct 05 '22 11:10

Bradley Allen