3

I am behind a proxy. Every time I execute the apt-get update command, this is the output on the screen

Err http://extras.ubuntu.com trusty InRelease

Err http://extras.ubuntu.com trusty Release.gpg                                
  Unable to connect to extras.ubuntu.com:http:
Err http://security.ubuntu.com trusty-security InRelease                       

Err http://security.ubuntu.com trusty-security Release.gpg                     
  Unable to connect to security.ubuntu.com:http: [IP: 91.189.91.15 80]
Err http://in.archive.ubuntu.com trusty InRelease       

Err http://in.archive.ubuntu.com trusty-updates InRelease

Err http://in.archive.ubuntu.com trusty-backports InRelease

Err http://in.archive.ubuntu.com trusty Release.gpg     
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]
Err http://in.archive.ubuntu.com trusty-updates Release.gpg
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]
Err http://in.archive.ubuntu.com trusty-backports Release.gpg
  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]
Reading package lists... Done
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/InRelease  

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease  

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease  

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Unable to connect to extras.ubuntu.com:http:

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Unable to connect to security.ubuntu.com:http: [IP: 91.189.91.15 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Unable to connect to in.archive.ubuntu.com:http: [IP: 91.189.88.149 80]

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

pings to all servers work just fine I have disable ipv6 adresses. Nothing seems to work. Can anyone help me

1
  • Any iptables configuration that could block connections like these? Also, you might want to try AskUbuntu.
    – Alex
    Dec 30, 2015 at 13:51

1 Answer 1

5

Ubuntu and debian systems.

Add:

Acquire::http::Proxy "http://yourproxyaddress:proxyport";

To file:

/etc/apt/apt.conf

This is the only entry in this file, and my system proxy variables are empty.

http_proxy
https_proxy
HTTP_PROXY
HTTPS_PROXY

other work arounds:

  1. Use the ip address not the FQDN in the acquire line.
  2. Add the proxy info to a browser, test proxy
  3. http v. https proxy
  4. does the proxy require authorization
3
  • The apt.conf file does not exist. Should I create it
    – Aymen Mir
    Dec 30, 2015 at 14:06
  • I would, might first do a -sudo find -iname "apt.conf"- from the root directory. Check the man page for "apt.conf" to make sure your system uses it.
    – jc__
    Dec 30, 2015 at 14:13
  • Thank you so much. It worked; the problem had bothered me through the day.
    – Aymen Mir
    Dec 30, 2015 at 14:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .