Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Using apt-get update I am getting

Err precise/main amd64 Packages              
404  Not Found

W: Failed to fetch
404  Not Found

E: Some index files failed to download. They have been ignored, or old
ones used instead.

The machine is behind proxy and proxy is configures correctly and the error is not coming for other packages fetched from the internet. It is more common with ppas. Never got a problem with other sources.

had the problem with:

deb precise main
deb [arch=amd64] precise main

also tried using Acquire::http {No-Cache=True;}; and treid cleaning the cache of list sudo rm /var/lib/apt/lists/*

Nothing worked out. The url that fails opens perfectly in browser or using wget.

This problem only happens when using proxy.

share|improve this question

marked as duplicate by muru, Fabby, Volker Siegel, Kevin Bowen, Eric Carvalho Mar 12 '15 at 0:33

This question was marked as an exact duplicate of an existing question.

Can you open those URLs successfully in a browser or with wget from behind the proxy? – David Foerster Mar 11 '15 at 0:31

Not sure what kind of Ubuntu and version you are using. Check your Ubuntu version using the command :

lsb_release -a

Ubuntu has proxy switcher, where you can choose -- apply systemwide -- like button. Then apt should work behind proxy with no problem.

Xubuntu and other non-gnome clones don’t have any proxy switcher, so there is necessary to update /etc/apt/apt.conf.d/proxies95 file.

If you have a username and password with the proxy then, open apt.conf:

sudo -H gedit /etc/apt/apt.conf

You'll see

Acquire::http::proxy "http://proxyIP:port/";
Acquire::https::proxy "https://proxyIP:port/";

change it to

Acquire::http::proxy "http://username:password@proxyIP:port/";
Acquire::https::proxy "https://username:password@proxyIP:port/";
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.