This question already has an answer here:

Using apt-get update I am getting

Err http://ppa.launchpad.net 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 http://_ppa.launchpad.net/rabbitvcs/ppa/ubuntu precise main
deb [arch=amd64] http:__ppa.launchpad.net/webupd8team/jupiter/ubuntu 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.

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new 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/";

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