Pages

Friday, September 23, 2011

Updating Packages behind prxy server in UBUNTU 11.10

Problem :  apt-get , Update Manager not able to download packages behind college/comapny proxy server.

Note : Sometimes there may be connection failure because of busy servers. So Please be patient during new Ubuntu release

Solution :
 
1) Open the Terminal and type the following command
     sudo gedit /etc/apt/apt.conf.d/02proxy

Note : 01proxy file is not present earlier.

2) Type the following line(in red) in the file:
     Acquire::http::Proxy “http://yourusername:yourpassword@yourproxy:yourport″;
    
Acquire::http::Proxy "http://foss:3189";
   


3) Save the file and your problem is solved.




14 comments:

  1. You are life saver. Thank you very much for this post.

    ReplyDelete
  2. I almost gave up on having a working ubuntu behind proxy. Man, ubuntu is becomin like windows, with every new version more and more things work worse or don't work at all, but oh, it looks so much nicer x(.

    Anyway, tanks a lot

    ReplyDelete
  3. SWEEEETTT!!!!!

    I also gave up

    ReplyDelete
  4. Thanks allot
    in home i removed the file but the apt-get no longer works
    so how can i remove the proxy from terminal ?
    Thanks

    ReplyDelete
  5. Just a correction, In the example add semicolon at end of the line.

    Acquire::http::Proxy “http://yourusername:yourpassword@yourproxy:yourport″;

    **It worked fine**
    Thanks :)

    ReplyDelete
  6. @Anonymous Oct 22

    I am out on vacation. Will check it after coming home

    @Anonymous Oct 24

    Thanks for the correction :)

    ReplyDelete
  7. Still not working... :(

    ReplyDelete
  8. Didn't work, when running apt I get an error message referring to the 02proxy file created by following this guide which says "junk at end of file"

    ReplyDelete
  9. @Anonymous(Nov 13)

    This is a syntax problem. Please Check that all the symbols are correctly placed.
    It is working fine on my system.

    ReplyDelete
  10. Naveen . . .. U r Awesome!! :))

    ReplyDelete
  11. Thanks very much....You saved my day!!!!

    ReplyDelete
  12. hey what happens if you ahve @ in your password. should i escape them? if so how?

    ReplyDelete
    Replies
    1. you can put '\' in front of special characters. DO NOT USE QUOTES.

      Ex:
      Acquire::http::Proxy "http://yourusername:yourpassword@yourproxy:yourport″;

      Acquire::http::Proxy "http://yourusername:pass\@word@yourproxy:yourport″;

      This should work. Try and tell me whether this thing works or not.

      Delete
  13. thanks!! i was just smashing my head against the table for the past two hours.

    ReplyDelete