As of Oct 08th 2014, I had the same issue, trying to update debian behind a proxy on local network. In the hope it will be relevant to others, I post my response here. As others have mentioned, editing /etc/hosts
is something one should be careful with.
But personally I just wanted to have the update done.
Content of /etc/apt/sources.list when doing the update (it was different before the update..):
deb http://http.debian.net/debian/ testing main
deb-src http://http.debian.net/debian/ testing main
deb http://mirrors.kernel.org/debian/ wheezy main
deb-src http://mirrors.kernel.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
Content of /etc/apt/apt.conf:
Acquire::http::proxy "http://192.168.1.10:7777/";
Acquire::http::Timeout "10";
Acquire::ftp::Timeout "10";
Addition to /etc/hosts:
#Workaround for making apt-get work (08-10-2014)
195.20.242.89 security.debian.org
130.89.148.12 ftp.debian.org
Now, running apt-get update ; apt-get upgrade
as root worked well.
As mentioned in other answers, use, run host command on the domain to get the correct ip to insert in the hosts file.
Example:
$ host ftp.debian.org
ftp.debian.org has address 130.89.148.12
This successfully updated the system to Debian GNU/Linux testing (jessie)
. You might not want to run with the testing repositories, then simply remove it from the sources. The testing repositories gives you more recent updates of several packages, but is not considered stable.
/etc/gai.conf
so thatsecurity.debian.org
's A record are returned before the AAA record, but I don't know precisely what to put in that file.