Google Plus

apt-get behind a proxy

Written by Mel Kham on . Posted in Frequently Asked Questions

Question : How  to  execute  the  apt-get  behind  a  proxy ?



Answer :

Follow the steps bellow to be able to execute apt-get behind a proxy:

$ cd /etc/apt
$ sudo vi  apt.conf

and  remove   this  :

Acquire::http::Proxy "false";

add this  to the  file :

Acquire::http::Proxy "http://user:pass@proxy_host:port";

 

Now  export   the  proxy   line  with

export http_proxy=http://user:pass@proxy_host:port

to  make  this   command  permanent   add  it  to  ~/.bash.rc  in your  home  directory

vi ~/.bash.rc

 

Now  restart   the  updates :

sudo aptitude update

 

Enjoy

 

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • http://kannad.com Jean-Baptiste DUPONT

    Why the hell I bumped suddenly into a proxy error each time I wanted to use aptitude?
    I still wonder.
    So your stuff helped me get through the issue.
    Mine was a bit different though. I wanted to eliminate the proxy stuff.
    So instead of the Acquire you proposed, I used the one you wanted to eliminate.
    I did the same with the export http_proxy by replacing the proxy chain by false like this:
    http_proxy=false
    And all work fine so far.
    Just as a curiosity, I would like to read an example with a real proxy in the text above. This would greatly help.
    Many thanks,
    jb

  • Supermanikin

    Very good! I have it done. Thank you! I have been struggling for days to find this solution :D 

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Lolman

|

in cmd

Oliver

|

Do you think that it works on a Macbook Air 1,1?… ohh and, it must be installed in a different partition than Mac OS X, right?… can´t have i installed only Ubuntu on my hard drive?

Nova

|

I wonder if there is a way to create your own themes.

Red Adaya

|

Thank you! This worked for me!!!

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .