3

Possible Duplicate:
apt-get does not work with proxy

I am a newbie to Ubuntu/Linux. I am using Ubuntu in office campus and we have a proxy server. I want to update or install new software like flash ,media player, networking tools etc., but I am unable to install from the Synaptic Package Manager.

I have created an apt.conf file which contains Acquire::http::Proxy "http://192.168.1.6:3128/"; I also have an apt.conf.d file but its empty and I don't know what to do with this file.

This is the error I encounter when I try to update:

E: Syntax error /etc/apt/apt.conf.d/proxy:3: Extra junk at end of file
E: Syntax error /etc/apt/apt.conf:2: Extra junk at end of file
3

2 Answers 2

5

I've created a new file in /etc/apt/apt.conf.d/, named 01proxy:

Acquire::http { Proxy "http://apt-proxy:3142"; };

where apt-proxy is the hostname of the proxy server. Been using this since 9.04, and It Works without any issues.

0

First, I would try using the Network Proxy configuration GUI.

If that fails, add the following to /etc/bash.bashrc:

export http_proxy=http://username:[email protected]:port/
export ftp_proxy=http://username:[email protected]:port/

You can omit the username:password, if your proxy server has no password.

Source.

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